4.3BSD rename() changes ctime

Griff Smith ggs at ulysses.homer.nj.att.com
Fri Aug 5 00:31:05 AEST 1988


In article <26657 at oliveb.olivetti.com>, jerry at olivey.UUCP writes:
> Prior to the "rename" system call the mv command would change the ctime
> of a file even though the resulting data AND inode were identical.
...
> ... now that we have rename, it still does!
...
> Is this a bug or is there some justification for rename updating the
> ctime?

I think this is necessary to make the "r" option of the "restore"
command work.  When doing a full "r" restore with incrementals, there
must be records of all changes to the name(s) of an inode.  The records
are kept by having "dump" write images of all directories that point to
changed files.  If the inode isn't marked as changed by "rename",
"dump" has no way of knowing that the directory must be dumped.
-- 
Griff Smith	AT&T (Bell Laboratories), Murray Hill
Phone:		1-201-582-7736
UUCP:		{allegra|ihnp4}!ulysses!ggs
Internet:	ggs at ulysses.att.com



More information about the Comp.unix.wizards mailing list