# HG changeset patch # User Oleksandr Gavenko # Date 1283281189 -10800 # Node ID bf4dcc22ccd9b8ee1ed0f3d0f7bc13c107e652ac # Parent 1e6ccb387d27d0d56fbab30791ca2b0bf94e0a95 How get file time attributes. diff -r 1e6ccb387d27 -r bf4dcc22ccd9 fs.rst --- a/fs.rst Mon Aug 30 23:51:37 2010 +0300 +++ b/fs.rst Tue Aug 31 21:59:49 2010 +0300 @@ -14,6 +14,25 @@ $ convmv --nosmart -f cp-1251 -t utf-8 -r $dir +* How get file time attributes. + +POSIX define 3 file time attributes: atime (access time, only a few OS/fs update +this parameter), ctime (attribute/inode modification time), mtime (modification +time). + +To get time you can use 'ls' command but it print time in locale dependent +irregular form: + + $ ls -l file.txt # last file modification + $ ls -lc file.txt # last file status modification + $ ls -lu file.txt # last access + +GNU coreutils provide more robust 'stst' utility: + + $ stat -c %Y file.txt # last file modification + $ stat -c %Z file.txt # last file status modification + $ stat -c %X file.txt # last access + * File names. ** POSIX.