Does anyone know the command to get the date CREATED for a file?
This is driving me berserk. Windows has it. But I cannnnnnot remeber what it is in UNIX!
Thanks!
Does anyone know the command to get the date CREATED for a file?
This is driving me berserk. Windows has it. But I cannnnnnot remeber what it is in UNIX!
Thanks!
ls -l should give you the file permissions, the date/time file was created. Do a man on 'ls'
ls -l gives you last modified. Not created.
I think it's just plain not stored anywhere.
I was just playing around with a tar file on a samba share at work, and it appeared to default creation time to last modified time... I was also able to set the modification time to 12/30/1969 12:00 PM, and have the modification time be the current time.
Unix does NOT store creation times, and to the best of my knowledge, tar doesn't store it internally anywhere.
Do not trust the creation times of files that are brought over to windows when originating in Unix. Windows just makes it up as it goes...
See this post for a explanation of ctime and mtime.
As for creation time, remember that when Ken Thompson wrote unix in 1969 it was revolutionary to have a file system shared by multiple users. The way unix worked back then encouraged people to create a new file and remove the old one if you were updating a file that was accessed by multiple people. Also it was necessary to periodically copy a filesystem to tape and reload the disk to defragment files. These things made a creation date silly.
By the late 70's, unix had more robust filesystems that no longer needed re-orgs and it had file locking system calls. This made creation date a possibility. And indeed HP added it into the first generation of HP-UX. At that time I was a sysadmin of an HP 9000/520 with creation date and an ATT 3B2 without creation date, so I got to see them side by side. Yes, creation date was useful several times a year, but I never really missed it on the 3B2. And creation date expanded both in-core and on-disk inodes by 4 bytes. So it's not like you get it for free. When HP rewrote HP-UX to use the McKusick filesystem, they dropped creation date. No one really complained very loudly.
There is a lot of competition in unix. Any features added to a kernel must pass a cost/benefit test or they will be dropped. The benchmarks enforce this rather strongly. Creation date had its day in court, but I doubt that any unix version still in existence has a creation date.
Microsoft OS's in contrast have little competition and are not written to win benchmarks. That's why they have a poorly thought out selection of features in their kernels.