![](https://seccdn.libravatar.org/avatar/e9ef85d7d3a585e64f3c35db0108c478.jpg?s=120&d=mm&r=g)
On Friday 19 August 2005 19:50, Greg Wallace wrote:
On Friday, August 19, 2005 @ 3:46 AM, Sid Boyce wrote:
Shriramana Sharma wrote:
http://en.wikipedia.org/wiki/Comparison_of_file_systems says that Reiser and ext do not support creation time-stamps. If this is true, why?
If there's a reason for FAT etc to have creation time-stamps, then that same reason will apply to Reiser/ext too, no?
I haven't checked the URL to see quite what they mean, but if we are on the same wavelength, any file on any filesystem has a creation date and time and if necessary, you can "touch file" so it updates the date and time to now. # vi abcd # ls -l abcd -rw-r--r-- 1 root root 9 2005-08-19 12:39 abcd # touch abcd # ls -l abcd -rw-r--r-- 1 root root 9 2005-08-19 12:45 abcd
Sid Boyce ... Hamradio License G3VBV, Keen licensed Private Pilot Retired IBM/Amdahl Mainframes and Sun/Fujitsu Servers Tech Support Specialist Microsoft Windows Free Zone - Linux used for all Computing Tasks
But Sid, we're talking about a date that would NOT be replaced; i. e., it would continue to show the original creation date. To do that, you'd need 3 dates --
*) Creation -- Never modified after file was originally created *) Updated -- Modified any time the file is updated *) Accessed -- Modified any time the file was touched
I looked at it from a different angle and I'm equally puzzled. I really did expect to find a "creation" timestamp and did not. kenjen@wolverine:~> touch abcd kenjen@wolverine:~> ls -l abcd -rw-r--r-- 1 kenjen users 0 2005-08-19 19:59 abcd kenjen@wolverine:~> stat abcd File: `abcd' Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: 305h/773d Inode: 7659 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 501/ kenjen) Gid: ( 100/ users) Access: 2005-08-19 19:59:14.697278000 -0400 Modify: 2005-08-19 19:59:14.697278000 -0400 Change: 2005-08-19 19:59:14.697278000 -0400 kenjen@wolverine:~> touch abcd kenjen@wolverine:~> stat abcd File: `abcd' Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: 305h/773d Inode: 7659 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 501/ kenjen) Gid: ( 100/ users) Access: 2005-08-19 20:00:42.138984840 -0400 Modify: 2005-08-19 20:00:42.138984840 -0400 Change: 2005-08-19 20:00:42.138984840 -0400 So, by default, touch touches everything by default. kenjen@wolverine:~> touch -a abcd kenjen@wolverine:~> stat abcd File: `abcd' Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: 305h/773d Inode: 7659 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 501/ kenjen) Gid: ( 100/ users) Access: 2005-08-19 20:05:15.189837000 -0400 Modify: 2005-08-19 20:00:42.138984000 -0400 Change: 2005-08-19 20:05:15.189474856 -0400 touch -a changed the "access" and the "change" time. kenjen@wolverine:~> touch -m abcd kenjen@wolverine:~> stat abcd File: `abcd' Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: 305h/773d Inode: 7659 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 501/ kenjen) Gid: ( 100/ users) Access: 2005-08-19 20:05:15.189837000 -0400 Modify: 2005-08-19 20:06:41.439402000 -0400 Change: 2005-08-19 20:06:41.439362880 -0400 touch -m changed the "modify" and the "change" time. I guess from the behavior that "change" means any kind of examination made to the file. For some reason I really did expect to find a creation timestamp. Curious. man fstat() shows the following time values on a file: time_t st_atime; /* time of last access */ time_t st_mtime; /* time of last modification */ time_t st_ctime; /* time of last status change */ Huh. This I understand should not be filesystem specific. I never really bothered to look at it before. But, it appears creation timestamp is not a unix-y thing. Wonder what I was smoking that had me thinking there was a creation timestamp? So I looked it up and found: http://www.faqs.org/faqs/unix-faq/faq/part3/section-1.html 3.1) How do I find the creation time of a file? You can't - it isn't stored anywhere. Files have a last-modified time (shown by "ls -l"), a last-accessed time (shown by "ls -lu") and an inode change time (shown by "ls -lc"). The latter is often referred to as the "creation time" - even in some man pages - but that's wrong; it's also set by such operations as mv, ln, chmod, chown and chgrp. The man page for "stat(2)" discusses this. Well, that explains that I think.