Re: ctimes vs mtime



John-Paul Stewart <jpstewart@xxxxxxxxxxxxxxxx> wrote:
: Leslie Ballentine wrote:
:> First let me say that I have read the book, and I know the difference
:> between ctime and mtime.
:>
:> My problem -- Whenever I do something that should (and does) change mtime,
:> ctime also changes.

....

: Why would you expect ctime not to change when writing to the file?

Why would I expect that? Because all the Unix books that I have read
say that mtime changes when the contents of the file is changed, and
ctime changes when the inode information is changed.
It was implied, if not stated explicitly, that a simple 'write' would
not change the inode information.
But according to 'man 2 stat', which you quote, that was not correct.

According to your information, there is no operation that changes mtime
but leaves ctime unchanged (the converse being, obviously, false).
If anyone has a counter example, I would like to hear about it.

Leslie
.



Relevant Pages