Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <42286896.3010604@byu.net> Date: Fri, 04 Mar 2005 06:54:30 -0700 From: Eric Blake User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: ctime: creation or change time? References: <1109798389 DOT 42262df5e7c1d AT webmail DOT namezero DOT com> <20050303113059 DOT GC2839 AT cygbert DOT vinschen DOT de> In-Reply-To: <20050303113059.GC2839@cygbert.vinschen.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Corinna Vinschen on 3/3/2005 4:30 AM: > On Mar 2 13:19, eric AT melski DOT net wrote: > >>In fact, NTFS has no notion of file change time as described in POSIX. Is there >>any chance of undoing this change? An alternative solution might be to simply >>use the NTFS file modify time for both the mtime and ctime of the file, since >>those two are almost always updated together anyway. Not true - some functions that only affect file metadata, such as utimes() or chown(), only touch the ctime. Furthermore, mtime can be arbitrarily set (thanks to utimes()), but the POSIX notion of ctime is that it is always an accurate snapshot of the last time something changed about a file, and cannot be arbitrarily changed. This is handy, for example, when untarring an archive - it preserves atime and mtime as they were when the archive was created, but sets ctime to the time the archive was untarred. > > > Well, we're trying to be POSIX like, so that's nothing we're going to > revert. I guess we're using ctime as change time even more in future. If you really want the old behavior, then propose a patch that adds an option to the CYGWIN environment variable. I envision the following: CYGWIN="ctime=creation": never touch ctime; let it be the Windows notion of file creation time CYGWIN="ctime=file_change": touch ctime for file modifications (chown, write, utimes, etc.). This would be the default level, and matches cygwin 1.5.13 behavior. CYGWIN="ctime=dir_change": touch ctime everywhere that POSIX requires (the containing directory needs to be touched on creat, rename, unlink, etc.) This is more time-consuming and not implemented in 1.5.13, because it requires opening additional directory file handles during the course of operation, but is necessary for more complete compliance to the standards. Having said all that, I'm not going to be the one to implement a patch along those lines. If the default bothers you, you are free to fix it. - -- Life is short - so eat dessert first! Eric Blake ebb9 AT byu DOT net -----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 iD8DBQFCKGiW84KuGfSFAYARAltJAKCwLrlJEqTj1siobEPuNOrgQDxNVQCdGpn/ q65RZygXUMvz3K4MOdMvbxM= =o+Xc -----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/