qsl has asked for the wisdom of the Perl Monks concerning the following question:
see the code below I am using[Localmachine:]date Thu Jul 6 14:45:01 IST 2006 [Remotemachine:]date Thu Jul 6 10:14:09 IST 2006
As per the code,it should take all the files,upto till now.@logfiles = $telnet->cmd("find . -mtime 0 -print"); foreach $logfile (@logfiles) { chomp($logfile); @contents = $telnet->cmd(qq(perl -MFile::stat -e 'print stat(s +hift)->mtime()' $logfile)); foreach $mtime (@contents) { chomp($mtime); $logtime = strftime( "%Y%m%d %H%M", localtime($mtime) +); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to get the latest files in directory
by Anonymous Monk on Jul 06, 2006 at 11:52 UTC |