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


UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 16.4 List All Subdirectories with ls -R Chapter 16
Where Did I Put That?
Next: 16.6 clf, cls: "Compressed" ls Listings
 

16.5 The Three UNIX File Times

When you're talking to experienced UNIX users, you often hear the terms "change time" and "modification time" thrown around cavalierly. To most people (and most dictionaries), a change and a modification are the same thing. What's the difference here?

The difference between a change and a modification is the difference between altering the label on a package and altering its contents. If someone says chmod a-w myfile , that is a change; if someone says echo foo >> myfile , that is a modification. A change modifies the file's inode ( 1.22 ) ; a modification modifies the contents of the file itself. [A file's modification time is also called the timestamp . - JP  ]

As long as we're talking about change times and modification times, we might as well mention "access times," too. The access time is the last time the file was read or written. So reading a file updates its access time, but not its change time (information about the file wasn't changed) or its modification time (the file itself wasn't changed).

Incidentally, the change time or "ctime" is incorrectly documented as the "creation time" in many places, including some UNIX manuals. Do not believe them.

- CT


Previous: 16.4 List All Subdirectories with ls -R UNIX Power Tools Next: 16.6 clf, cls: "Compressed" ls Listings
16.4 List All Subdirectories with ls -R Book Index 16.6 clf, cls: "Compressed" ls Listings

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