Path: utzoo!utgpu!watmath!iuvax!rutgers!columbia!cs!dupuy From: dupuy@cs.columbia.edu (Alexander Dupuy) Newsgroups: comp.bugs.4bsd Subject: Re: stealth technology for find(1) Message-ID: Date: 8 Aug 89 15:06:04 GMT References: <3584@mentor.cc.purdue.edu> Reply-To: dupuy@cs.columbia.edu Organization: Columbia University Computer Science Department Lines: 40 In-reply-to: dls@mentor.cc.purdue.edu's message of 8 Aug 89 04:13:10 GMT The only problem with your fix is that by resetting the atime of the directory to the old time, you also set the ctime of the directory to be the current time. While this is not always a problem, in some circumstatnces, you may be more concerned with preserving the ctimes (e.g. for incremental backup purposes) than you are with preserving the atime. You could make your stealth code conditional on some sort of option flag for find, but some will certainly argue that find already has to many options, and that the subtleties of ctime/[am]time interactions are a bit too much for most users of find to grasp. For reference, the rules are: Files: atime: updated when created, read(). mtime: updated when created, write(), truncate(). ctime: updated when created, write(), truncate(), chown/chmod(), utime/utimes(), link/unlink/rename() of self. Directories atime: updated when created, read(), getdents/getdirentries(). mtime: updated when created, link/unlink/rename/rmdir() of entries. ctime: updated when created, link/unlink/rename/rmdir() of entries, chown/chmod(), utime/utimes(), link/unlink/rename() of self. In general, the atime is updated whenever the data in a file is read, the mtime is updated whenever the data in a file is modified, and the ctime is updated whenever the data associated with the inode is changed. @alex -- -- inet: dupuy@cs.columbia.edu uucp: ...!rutgers!cs.columbia.edu!dupuy