4
$ istat TESTFILE.txt
Inode 2317 on device 12/7       File
Protection: rw-------   
Owner: 4847(testuser)           Group: 346(testuser)
Link count:   1         Length 1480 bytes

Last updated:   Sun Jun 15 08:20:17 2014
Last modified:  Sun Jun 15 08:20:17 2014
Last accessed:  Sun Jun 15 13:03:37 2014

$ 

istat doesn't know any format for UNIX TIME on AIX?

My question: How can I display the modification time for a file in UNIX TIME format on AIX?

11

You can use perl:

$ perl -le 'print((stat shift)[9])' test.txt
1402577190

Or GNU date:

$ date -r test.txt +%s

You can install GNU date on AIX refer to this link.

-1
date -r test.csv +%d%m%Y

This will give you the complete formatted date

  • Welcome to U&L, Elaya! You might have missed the AIX tag in the question; AIX's date command supports a different set of flags/options, which don't include -r – Jeff Schaller Oct 24 '16 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.