Actually, there's no such thing as 'created' time in Unix
Quote:
Three fields in the inode structure contain the last access, change, and modification times: atime, ctime, and mtime. The atime field is updated each time the pointer to the file's data blocks is followed and the file's data is read. The mtime field is updated each time the file's data changes. The ctime field is updated each time the file's inode changes. The ctime is not creation time; there is no way under standard Unix to find a file's creation time.
Reading a file changes its atime only. Changing a file's name doesn't change atime, ctime, or mtime, because the directory entry changed (it does change the atime and mtime of the directory the file is in, though). Truncating a file doesn't change its atime (because we haven't read; we've just changed the size field in its directory entry), but it does change its ctime because we changed its size field and its mtime because we changed its contents (even though we didn't follow the pointer to do so).
|
Perl CookBook
Under the new ext4 filesystem there is a new birth time field, but its not currently supported by most tools, so its usually empty.
The only guaranteed way to preserve the date/time of eg creation is to embed it in the filename (or content).
The usual convention is YYYYMMDD (& optionally '_HHMISS') eg name_YYYYMMDD.ext .
This cause the files to sort naturally if you've got multiple same name files.
HTH