RE: Comparing timestamp of 2 files

2003-06-12 Thread Bob Showalter
Amit Sharma wrote: > But -M option gives -M Script start time minus file modification > time, in days. > But I need the difference in seconds between 2 different files and > not with the script. Well, you should have said that. -M is easiest way to compare two files to see if one is older or newe

Re: Comparing timestamp of 2 files

2003-06-12 Thread Rob Dixon
Amit Sharma wrote: > Hi All, > > I need your help to compare the file timestamp of 2 different files. > Please suggest how can I do this in perl. Use 'stat' to fetch the create, modify, or inode change time of the files. Then compare them as numbers: my ($file1, $file2); my ($atime1, $mtime1

Re: Comparing timestamp of 2 files

2003-06-12 Thread Amit Sharma
But -M option gives -M Script start time minus file modification time, in days. But I need the difference in seconds between 2 different files and not with the script. Amit. >>> "Ohad Ohad" <[EMAIL PROTECTED]> 6/12/2003 1:19:52 PM >>> Check out http://www.perldoc.com/perl5.8.0/pod/func/-X.html

Re: Comparing timestamp of 2 files

2003-06-12 Thread Ohad Ohad
Check out http://www.perldoc.com/perl5.8.0/pod/func/-X.html You'll probably want to use the -M op. Ohad. From: "Amit Sharma" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Comparing timestamp of 2 files Date: Thu, 12 Jun 2003 12:04:48 +0530 Hi All, I need your help to compare the file time