Linux Box Admin
Trusted Remote Administration
logo

Tilde
What's new
Articles
Micro HowTos
About
Contact







File Timestamps
(0 votes)
Wednesday, 07 March 2007
   
    File Timestamps    
     
       
 

Each file has three dates associated with it (stored as the number of seconds since the epoch, Jan 1, 1970). The three timestamps are

  • Access time (atime) - the last time the file was read
  • Modify time (mtime) - the last time the file contents were changed
  • Change time (ctime) - the last time the file permissions were changed

 

In a long directory listing, the timestamp shown is the Modify time (mtime). To see all timestamps, use:
stat filename

Here is sample output from stat:

  File: `apache.php'
Size: 9791 Blocks: 24 IO Block: 4096 Regular File
Device: 302h/770d Inode: 1818841 Links: 1
Access: (0644/-rw-r--r--) Uid: (32045/ wileyjb) Gid: (32045/ wileyjb)
Access: 2006-03-08 13:48:55.000000000 -0500
Modify: 2006-03-04 14:33:37.000000000 -0500
Change: 2006-03-04 14:33:37.000000000 -0500

 

   
       
         
 

Copyright © 2006,2007 Linux Box Admin.

 
My NHL fan blog