Mazza, Glen R., ,CPMS said:
>
> and get a response--including the year--like:
>
> 2002 Oct 4 11:04

I am very much a perl newbie but this thing seems to work:

#!/usr/bin/perl -w

# change:
# a stat on 8 shows last access time
# 8 to 9 for last modification time
# 8 to 10 for last inode change time

foreach $file (@ARGV) {
        $time = (stat("$file"))[10];
        print "$file " . scalar localtime($time) . "\n";
        }


sample output:
aphro@defiant:~$ ./date.pl  strace.log tpctl_1.0.tar.gz
strace.log Tue Jan 28 18:28:07 2003
tpctl_1.0.tar.gz Tue Jan 28 18:28:07 2003
aphro@defiant:~$

there may be a faster way.....

hope this helps :)

nate





-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to