Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: File test to see creation time rather than last modified time

by MidLifeXis (Monsignor)
on Feb 05, 2009 at 17:38 UTC ( #741616=note: print w/ replies, xml ) Need Help??


in reply to File test to see creation time rather than last modified time

Under *nix, ctime is not creation time, but actually the last time the inode for the file was changed (from man stat - Last file status change time). MTime is the last modification time. As was said by kennethk in Re: File test to see creation time rather than last modified time, *nix does not record creation time of a document. An inode may change at some unexpected times (for example, when the mtime is changed).

ls also lists the -c option as

Use time of last modification of the inode (file created, mode changed, etc.) for sorting (-t) or printing (-l (ell))

I have seen the c in ctime being misunderstood for the 15-20 years I have been using *nix. In my tenure, this misunderstanding has been the cause of many mistakes on interpreting data from the filesystem.

--MidLifeXis


Comment on Re: File test to see creation time rather than last modified time
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://741616]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (17)
As of 2015-07-31 13:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (278 votes), past polls