Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: comparing files based on timestamps

by manoj_speed (Parson)
on Apr 02, 2009 at 07:43 UTC ( #754885=note: print w/replies, xml ) Need Help??


in reply to comparing files based on timestamps

Using stat() function we can get it.

Let's try this example,

#! /bin/perl
use strict;
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$ctime,$blksize,$blocks) = stat("subfolder1");
print "$atime\t$mtime\t$ctime\n";

my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,$blksize,$blocks) = stat("Library");
print "$atime\t$mtime\t$ctime\n";

For more details see "perldoc -f stat".

  • Comment on Re: comparing files based on timestamps

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://754885]
help
Chatterbox?
[shmem]: hmm...
[shmem]: Lady_Aleena: perl -MMP3::Tag -MFile::Find -le 'find(sub{if($File ::Find::name=~/\. mp3$/){$sum+=MP3:: Tag->new($_)-> interpolate("\%S ")} }, "Music"); print "total seconds: $sum"'

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2017-04-23 22:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (432 votes). Check out past polls.