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.

What can you do to a file without triggering the "Change" stat? For instance, it appears that simply changing a bit will trigger Change.

share|improve this question
add comment

2 Answers

up vote 7 down vote accepted

You can read the file. That will update its access time (unless disabled with a mount option like noatime), but not its inode change time.

Anything else, whether it's changing the file's data, changing its metadata, or renaming it, updates the change time. That's by design.

share|improve this answer
add comment

Presumably by "change stat" you mean the ctime of the file? In which case the simple answer is, not very much...

The ctime records when the file's inode (essentially it's metadata) was last changed so any change to, for example, the permissions of the file will cause the ctime to change.

On top of that changing the contents of the file will change it's size and/or update it's mtime, both of which will be recorded in the inode which will cause the ctime to change.

About the only change to an inode which doesn't cause ctime to change is the updating of atime when you read a file.

share|improve this answer
add comment

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.