find: ctime & mtime

L. Mark Larsen lml at cbnews.ATT.COM
Wed Dec 21 07:44:27 AEST 1988


In article <388 at hrc.UUCP> dan at hrc.UUCP (Dan Troxel VP) writes:
>
>What is the difference of the find options ctime and mtime?
>How will the two different options give me two differnt listings?
>Or will they?
>Should I use atime, to be safe, when I do incremental backups every night?
>-- 
>Dan Troxel VP of Computer Operations @ 
>Handwriting Research Corporation - 2821 E. Camelback Road Suite 600
>Phoenix, AZ  85016       WK 1-602-957-8870        HM 1-602-435-1240
>UUCP : asuvax!hrc!dan

The three times are stored in the inode:
atime - the last time the contents of a file were accessed
mtime - the last time the contents of a file were changed
ctime - the last time the inode associated with a file was changed

Whenever a file is read, modified or the permissions or ownership are changed,
the ctime is updated.  The ctime is only updated by the operating system,
the other two times can be set arbitraily using touch(1).  Generally, it
is best to use the mtime option to find files that have really changed.

L. Mark Larsen
att!atlas!lml
lml at atlas.att.com



More information about the Comp.unix.wizards mailing list