Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
ls date format
Name: nauj Date: April 30, 2007 at 06:56:43 Pacific OS: AIX 5.1 CPU/Ram: IBM Product: IBM
Comment:
I want to get the modification date of a file in a AIX system, but in a date-time format, for example (dd/mm/yyyy hh:mm:ss) (SECONDS included)
When I make an ls -la, I get this:
hacsvc08:/home/grpa/dwb/DWBANTE/IN > ls -la *D070120* -rwxrwx--- 1 vadwb gadwb 75 25 abr 13:42 CONTADOR.ENT.D070120
I want to know the date 25 abr 13:42 with seconds that is: 25 abr 13:42:XX
Name: ghostdog Date: April 30, 2007 at 07:17:31 Pacific
Reply:
Do you have Perl in your system? if have, you can do #perldoc -f stat and it shows you how to get time info from a file.
0
Response Number 2
Name: nauj Date: April 30, 2007 at 08:05:03 Pacific
Reply:
Thanks for your help, unfortunately i don't have Perl in my system, do you know any other way??
Any advice will be greatly aprecitted
0
Response Number 3
Name: nails Date: April 30, 2007 at 15:08:02 Pacific
Reply:
Too bad you can't take ghostdog's perl suggestion. The problem with the classic long listing of the ls command is that the structure changes after the file is 6 months old.
Summary: Hi all, I am trying to change the date format from MM/DD/YYYY to MMDDYYYY in the fixed width file using shell. dates are in fields 19-28 and 29-38. Any help is greatly appreciated. Thanks ...
Summary: Hi all, I'm using ksh, and have a problem over date formatting and getting the difference between them. First of all, I need to remove some information to get the time from it. A timestamp from my lo...
Summary: Dear All, I'm using following script to calculate Yesterday's Date as a portion of a huge script. #!/bin/ksh set -A DAYS Sat Sun Mon Tue Wed Thu Fri Sat set -A MONTHS Dec Jan Feb Mar Apr May Jun Jul ...