delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/04/11/11:58:25

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Mon, 11 Apr 2005 16:48:46 +0100
From: thomas DOT revell AT powerconv DOT alstom DOT com
Subject: ctime updated unexpectedly
To: cygwin AT cygwin DOT com
Message-id: <OF286F4D15.916188BB-ON80256FE0.005594D1-80256FE0.00577D05@test.alstom.com>
MIME-version: 1.0
X-IsSubscribed: yes

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.

If I do this, for example (in an empty directory):

echo "First file" > file1
(wait a few seconds)
echo "Second file" > file2
(wait a few seconds)
echo "Third file" > file3

and then type ls -c, I will get the output:
file3 file2 file1
which is what I'd expect.

If I then type:
echo "Another line" >> file1
then I'd expect the output from ls -c to remain in the same order, because 
the only change has been to the file content. However, the output I 
actually get is:
file1 file3 file2

ls -lc shows that file1 does have the most recent ctime, but if I've 
understood what the ctime means correctly, then it shouldn't have. I know 
this is a very simple example, but understanding what's going on here is 
very important for some work I'm doing at the moment.

I'm using Windows 2000 Professional (SP4), and version 1.5.14 of 
cygwin1.dll. I'm using an NTFS file system.

Any advice will be much appreciated.

Regards,

Tom


:.________________
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.

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019