Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I checked manual of find , and there's an option -ctime which specify the last modification time of inode.

But on what occasion would inode change ? When is that option useful ?

share|improve this question
2  
The inode can change but what you mean is the file status information associated with a certain inode. I don't answer since I didn't double check, but it would change when you change your rights, access time, owner, data, etc. This option is useful if you want to check what changed recently on your filesystem, for security reasons (but it's not reliable of course) or just because you forgot what file you just modified. It's just a tool that gives your control, options are here because a file/inode has properties, it's up to anyone to find a use, just know it's here, eventually it'll be useful. –  Aki Feb 9 '12 at 9:20

1 Answer 1

up vote 3 down vote accepted

To simplify:

  • Any change in file contents changes both the mtime and the ctime.
  • Any change in metadatas (permissions and other information shown by stat) changes only ctime.

When is it useful: I don't know… But for example, if you want an over-approximation for the time when the last link (ln) to the inode was created, you should check ctime not mtime.

share|improve this answer
1  
An important use of the ctime is for incremental backups: anything you might want to back up (data or metadata) affects the ctime, so if the ctime is older than the last backup, you don't need to back up again. –  Gilles Feb 10 '12 at 1:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.