[Techtalk] file creation date

Miriam English mim at miriam-english.org
Sat Apr 7 02:15:41 UTC 2012

I've often been in situations where it would be very useful (or even 
necessary) for Linux to have a creation date instead of merely change, 
modify, access. It seems like a sensible thing to have, right? Much more 
sensible than change AND modify, which seems like unnecessary duplication.

Yes, I know that change is supposed to track status bits and modify is 
supposed to track file contents (and I can never remember which is which 
because the words "change" and "modify" are synonyms), but in practice 
an alteration to the file itself usually changes both dates anyway, so a 
separate date for status bits is almost useless because it only adds any 
extra info if the status bits were altered without changing the file. 
Okay, I can imagine some rare security situations where that might be 
useful, like tracking an intruder's footprints. But I can see very 
common uses for a file creation date.

I was looking on the net for other ideas on how I might be able to get 
around the lack of creation date and I read that the ext4 filesystem 
designers were thinking of adding creation date to its inode 
descriptors. I have to say, it is about time this was done. I was struck 
by the number of questions on the net by people wanting to use file 
creation date in Linux.

Does anybody know if that was done? And if so, how I could access inode 
data to find out the creation date? I don't think there are any Linux 
commands that can give the creation date (yet).

I believe Btrfs (B-tree filing system) is much superior to ext4 and is 
currently being developed for Linux, but is not fully mature yet. It 
records creation date. Same problem reading creation date though.

Failing that, I believe BSD (UFS2 -- Unix File System 2) fully supports 
creation date. I think I'd need to install BSD to format a partition to 
UFS2, and I have a feeling Linux might not be able to access it anyway. 
:( BSD can also use ZFS which can be accessed via ZFS-FUSE in Linux. It 
has creation date and some kind of extended attributes that I don't 
really understand.

I'd prefer something open like ext4 or UFS2 or Btrfs, over something 
like NTFS, which is closed and proprietary. (NTFS supports creation 
date, as do the majority of filing systems -- even ancient CP/M 
supported file creation date!)

Lastly, I've noticed Universal Disk Format (UDF), supports creation, 
archive, modification, attribute, access dates. I know UDF is used 
mainly on optical media, and I'm not sure if it can be used on flash 
drives or hard drives. It may well have significant drawbacks as a 
general-purpose filing system. But presumably Linux is able to access 
the various datestamps, although once again, I don't know how I'd do that.

Currently I use clumsy hacks like adding the date to the filename or 
directory name, or if a text file, writing the date into the beginning 
of the file (though I infuriatingly often forget to do this). The Amiga 
allowed the easy addition of metadata files (extension .info) for 
documents to let you put in any stuff you felt like, such as icon data, 
association with an arbitrary program, date, author, etc. On linux I 
have made some data files into Apps like those you find in 
/usr/local/apps/ but this is tedious and wasteful, however it does let 
me store arbitrary data like creation time, author, etc. in the 
associated xml file.

[sigh] Anybody have any ideas?


	- Miriam

If you don't have any failures then you're not trying hard enough.
  - Dr. Charles Elachi, director of NASA's Jet Propulsion Laboratory
Website: http://miriam-english.org
Blogs:   http://miriam-e.dreamwidth.org

More information about the Techtalk mailing list