File times in 4.[23]

Guy Harris guy at sun.uucp
Thu Aug 21 15:36:43 AEST 1986


> 4.3:	access time changed by read *only*.
> 	modify time changed by write
> 	creation time never changed (except by creation, of course).

It's impossible to change the creation time on a UNIX file, since there
isn't one!  The "c" in "ctime" stands for "change", which is a somewhat
vague term; it actually refers to any change to the inode.  This definitely
includes "chmod"; I just rlogged into a machine here running straight 4.3BSD
(it's name is "sunvax", and it's a VAX-11/750) and created a file.  I did an
"ls -lc", waited about a minute, changed its mode, and did another "ls -lc".
Lo and behold, the inode change time had changed!

I don't know how you got those results for 4.2BSD and 4.3BSD, but either you
didn't do something right or your kernel is funny.
-- 
	Guy Harris
	{ihnp4, decvax, seismo, decwrl, ...}!sun!guy
	guy at sun.com (or guy at sun.arpa)



More information about the Comp.unix.wizards mailing list