Sep 23, 2003 #1 jestrada101 Technical User Joined Mar 28, 2003 Messages 332 Is there a unix command that will give me the date/time of a file? Or is a script needed that utilizes "ls" to manipulate an output.. Thanks je
Is there a unix command that will give me the date/time of a file? Or is a script needed that utilizes "ls" to manipulate an output.. Thanks je
Sep 23, 2003 #2 cruel Programmer Joined Aug 6, 2001 Messages 131 think of it this way, that is something you can brag about being a script writer. Upvote 0 Downvote
Sep 23, 2003 #3 Annihilannic MIS Joined Jun 22, 2000 Messages 6,317 Location AU I use this Perl fragment to do it: Code: #!/usr/bin/perl if ($#ARGV < 0) { print "usage: filedate.pl <filespec>\n"; } else { print localtime((stat($ARGV[0]))[9]) . "\n"; } I'm not as cruel as cruel. Annihilannic. Upvote 0 Downvote
I use this Perl fragment to do it: Code: #!/usr/bin/perl if ($#ARGV < 0) { print "usage: filedate.pl <filespec>\n"; } else { print localtime((stat($ARGV[0]))[9]) . "\n"; } I'm not as cruel as cruel. Annihilannic.
Sep 24, 2003 #4 RShaw MIS Joined Oct 23, 2002 Messages 10 Location US hink this is what your looking for... ls -l |nawk '{printf "%-25 s %-5s %-5s%s\n", $9 , $6 , $7 , $8 ;}' Of course I could be wrong... Upvote 0 Downvote
hink this is what your looking for... ls -l |nawk '{printf "%-25 s %-5s %-5s%s\n", $9 , $6 , $7 , $8 ;}' Of course I could be wrong...