How to get information about a file such as last access, modified or changed time using Linux?
|
|
|
|
|
Question: How to get information about a file such as last access, modified or changed time using Linux? NOTE: Tested and tried on Ubuntu 9.04 Answer:Â By using the 'stat' command. stat = Display file or file system status Example:Â
Input:
stat photos-20090916-0.db
Output: File: `photos-20090916-0.db'
Size: 3072Â Â Â Â Â Â Â Â Blocks: 8Â Â Â Â Â Â Â Â Â IO Block: 4096Â Â regular file
Device: 807h/2055d   Inode: 529743     Links: 1
Access: (0644/-rw-r--r--)Â Uid: ( 1000/Â user)Â Â Gid: ( 1000/Â user)
Access: 2009-09-16 08:22:12.085106864 +0200
Modify: 2009-09-16 08:22:11.490127752 +0200
Change: 2009-09-16 08:22:11.526128486 +0200
|