fs.rst
changeset 519 bf4dcc22ccd9
parent 447 4c923e95c2e5
child 598 36edace509c9
--- 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.