ls date format
|
Original Message
|
Name: nauj
Date: April 30, 2007 at 06:56:43 Pacific
Subject: ls date formatOS: AIX 5.1CPU/Ram: IBMModel/Manufacturer: 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 is that possible?? Any advice will be greatly apreciatted Thanks in advance
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: ghostdog
Date: April 30, 2007 at 07:17:31 Pacific
Subject: ls date format |
Reply: (edit)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.
Report Offensive Follow Up For Removal
|
|
Response Number 2
|
Name: nauj
Date: April 30, 2007 at 08:05:03 Pacific
Subject: ls date format |
Reply: (edit)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
Report Offensive Follow Up For Removal
|
|
Response Number 3
|
Name: nails
Date: April 30, 2007 at 15:08:02 Pacific
Subject: ls date format |
Reply: (edit)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. Consider this miscellaneous unix tips column: http://www.unixreview.com/documents... The third tip discusses using year instead of time in the ls command. Perhaps you can modify it to suit your needs.
Report Offensive Follow Up For Removal
|
Use following form to reply to current message: