How to get modification time for a file (in UNIX TIME!) on AIX

aixdate

$ 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?

Best Answer

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.