Re: ctime updated unexpectedly

2005-04-12 Thread thomas . revell
> 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 :(

Sorry, I don't know of any way with POSIX semantics to track when just
file metadata has changed.  There are several utilities such as cmp,
md5sum, diff, etc. that can tell you if files have the same contents.  You
might try asking on a Unix users newsgroup, since it is not just cygwin
that has the property of file modifications touching both ctime and mtime.

Fair enough. The changes weren't actually as bad as I expected. Thanks 
again for your advice.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: ctime updated unexpectedly

2005-04-12 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to [EMAIL PROTECTED] on 4/11/2005 10:14 AM:
> 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 :(

Sorry, I don't know of any way with POSIX semantics to track when just
file metadata has changed.  There are several utilities such as cmp,
md5sum, diff, etc. that can tell you if files have the same contents.  You
might try asking on a Unix users newsgroup, since it is not just cygwin
that has the property of file modifications touching both ctime and mtime.

- --
Life is short - so eat dessert first!

Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCW77384KuGfSFAYARAkNeAJ4rhicc8rdotaA25V4uW9lBYMSxawCg00xx
0mfqo+pBZ8UxrFp60U9szEg=
=tE33
-END PGP SIGNATURE-

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: ctime updated unexpectedly

2005-04-11 Thread thomas . revell
>Hi everyone,
>> 
>> I wonder if someone could clear up an issue I'm having with ls -c 
(sorting 
>> files by ctime). As I understand it, the ctime is only updated when 
file 
>> status information (such as permissions) changes, or a file is 
completely 
>> 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 
and 
>> may be privileged. If  you are not a named recipient, please notify the 

>> sender immediately and do not disclose the contents to another person, 
use 
>> 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.

>--
>Eric Blake

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: ctime updated unexpectedly

2005-04-11 Thread Eric Blake
> Hi everyone,
> 
> I wonder if someone could clear up an issue I'm having with ls -c (sorting 
> files by ctime). As I understand it, the ctime is only updated when file 
> status information (such as permissions) changes, or a file is completely 
> 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.

> 
> :.
> CONFIDENTIALITY : This  e-mail  and  any attachments are confidential and 
> may be privileged. If  you are not a named recipient, please notify the 
> sender immediately and do not disclose the contents to another person, use 
> 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.

--
Eric Blake



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/