This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: file times still not quite right with 1.5.14 on Windows 98


Jacek Piskozub wrote:
Hi,

This is funny. I used the same test as Josef Drexler but on Windows ME after upgrading to cygwin 1.5.14. Of course the filesystem is also FAT (FAT32 in my case).

First I tried it from a DOS window:

C:\Download\test>touch test.txt
C:\Download\test>ls -l test.txt
-rw-r--r--  1 piskozub mkgroup 0 Apr  3 23:16 test.txt
C:\Download\test>ls -l --time=ctime test.txt
-rw-r--r--  1 piskozub mkgroup 0 Apr  3 23:16 test.txt
C:\Download\test>echo > test.txt

Are you sure you didn't append with ">>" here? That's the behaviour I got when appending.


C:\Download\test>ls -l test.txt
-rw-r--r--  1 piskozub mkgroup 12 Apr  3 23:18 test.txt
C:\Download\test>ls -l --time=ctime test.txt
-rw-r--r--  1 piskozub mkgroup 12 Apr  3 23:16 test.txt

I believe this is exactly what Josef saw with bash. But then, after 2 minutes, I start bash and try again:

C:\Download\test>bash
BASH-2.05b$ echo > test.txt
BASH-2.05b$ ls -l test.txt
-rw-r--r--  1 piskozub mkgroup 2 Apr  3 23:20 test.txt
BASH-2.05b$ ls -l --time=ctime test.txt
-rw-r--r--  1 piskozub mkgroup 2 Apr  3 23:20 test.txt

Can you explain this?

I have no problems with mtime not getting set when new files are created (e.g. "echo > test.txt"), only when appending to existing files (e.g. "echo >> test.txt").


The only other difference I can think of is that the file was zero-byte in size in your first test. I've never tried this with empty files.

--
   Josef Drexler                 |       http://jdrexler.com/home/
---------------------------------+----------------------------------------
 Please help Conserve Gravity    |  Email address is *valid*.
 Play Chess, not Basketball.     |  Don't remove the "nospam" part.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]