This is the mail archive of the
mailing list for the Cygwin project.
Re: ctime updated unexpectedly
- From: thomas dot revell at powerconv dot alstom dot com
- To: ericblake at comcast dot net (Eric Blake)
- Cc: cygwin at cygwin dot com
- Date: Mon, 11 Apr 2005 17:14:13 +0100
- Subject: Re: ctime updated unexpectedly
>> I wonder if someone could clear up an issue I'm having with ls -c
>> files by ctime). As I understand it, the ctime is only updated when
>> status information (such as permissions) changes, or a file is
>> recreated. It looks to me though, like the ctime is being updated every
>> time the contents of a file change.
>You misunderstand ctime, as specified by POSIX. See http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap04.html, section 4.7, and >various other places within POSIX. ctime is required
to reflect any change to a file's metadata _or contents_. Also, while
mtime can be >arbitrarily changed (think utimes()), ctime is supposed to
be an accurate side effect of file modification that cannot be spoofed.
OK, thanks for the advice. Do you know if there is any way I can get the
information I was expecting. If not, I'll have to make some major changes
to some complicated shell scripts :(
>> CONFIDENTIALITY : This e-mail and any attachments are confidential
>> may be privileged. If you are not a named recipient, please notify the
>> sender immediately and do not disclose the contents to another person,
>> it for any purpose or store or copy the information in any medium.
>Disclaimers like this to a public mailing list are not wise; some people
refuse to respond to messages with such a disclaimer.
Oops, my bad.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html