6

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

2 Answers 2

6

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.

4

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .