Greg Wallace wrote:
On Sunday, April 09, 2006 @ 2:50 PM, Joachim Schrod wrote:
By the way, the full formal definition of ctime is buried in the pit of the Single Unix Specification; where every function that changes the ctime value says so explicitly in its description. See http://www.opengroup.org/onlinepubs/009695399/toc.htm
I promise I'm not trying to steal this thread,
Subject changing is a good idea then. ;-)
What type of action changes the file's status change date (and would that also necessarily change the file's creation/modification date?)?
Everything that changes the file name or its content updates ctime, also mtime. One can set the mtime explicitly with utime() or utimes(), but not the ctime. In fact, utime() updates ctime itself. This means that ctime is the more reliable indicator when a file was changed the last time in any way than mtime. For example, if you unpack a tar or zip archive, or if you install an RPM, the files' mtime will get set as specified in the archive, but the ctimes are set to the timestamp of unpacking. For the precise information I posted the link above. Click on "Word" search, and search for "st_ctime" in the XSH section. Then all C functions appear that (may) update ctime. Cheers, Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod Email: jschrod@acm.org Roedermark, Germany