I’m looking for a command on AIX 7.1 that can give me filenames, size, and complete date/time (in a uniform format).
ls -l
and similar commands have the drawback that they give date (month and day) and time (hour and minute), if the file is not older than 6 months, and date and year otherwise. (I want year, month, day, hour, minutes and seconds for all files.)The AIX version of
ls
does not support--full-time
, reportingls: Not a recognized flag: - ls: Not a recognized flag: - Usage: ls [-1ACFHLNRSabcdefgiklmnopqrstuxEUX] [File...]
What command that exists on AIX will give me the full date/time, in a consistent format, and the file size?
stat
command? Have you looked closely at the capabilities offind
? – Scott - Слава Україні Oct 14 '17 at 04:32stat
, you could just print it up with perl or similar. Example:perl -le 'print scalar localtime ((lstat "filename")[9])'
– BowlOfRed Oct 14 '17 at 05:29