home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 21.5 What Good Is a File's Last Access Time? Chapter 21
More About Managing Files
Next: 21.7 Setting File Modification Time with touch
 

21.6 A File's Inode Change (not "Creation"!) Time

An old ls manual page I have says that the ls -c option lists the "time of file creation." Boo, hiss! That's an old UNIX myth. UNIX keeps three times for each file: last modification (mtime ), last access (atime ) (21.5 ) , and last inode (1.22 ) modification (ctime ). A file's ctime is changed when the file is modified or when something kept in the inode (number of hard links, owner, group, etc.) has been changed. If you need to find out when that time was changed, use ls -lcr or find \-ctime (17.5 , 17.7 ) .

Many computer sites check the ctime to decide which files to back up.

- JP


Previous: 21.5 What Good Is a File's Last Access Time? UNIX Power Tools Next: 21.7 Setting File Modification Time with touch
21.5 What Good Is a File's Last Access Time? Book Index 21.7 Setting File Modification Time with touch

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System