From: Peter Bailey Date: 2006-11-15T01:39:50+09:00 Subject: Re: What's up with File.ctime? Hugh Sasse wrote: > On Tue, 14 Nov 2006, Jan Svitok wrote: > >> On 11/14/06, Peter Bailey wrote: >> > Hello, >> > I need to notate the date/time attributes of files. I'm using File.ctime >> > and trimming it back to show just day, date, and time. > [...] >> > But, I've noticed that files that list in the directories as being dated >> > November 8 are showing via ctime as November 13 files. What's up? >> >> Perhaps dir/ls shows mtime? Try checking mtime/ctime/atime to see >> which is the right one. >> To display ctime on windows, try dir /T:C on unix ls -l --time=ctime > > ls -lu ;# => atime > ls -lc ;# => ctime > ls -l ;# => mtime > > ctime means Inode modified, i.e. created, chmod'ed, etc. See man ls > if you're on unix. DIR /T:A gives access time according to XP docs. > > Hugh Thanks, you guys. Nope, I'm on Windows. Yes, "dir /t:a" is probably the equivalent to ctime, but, again, that's not what I want. I just want the file time as it's listed in a garden-variety "dir." -- Posted via http://www.ruby-forum.com/.