Different file systems have different ways of dealing with "creation time". Normal Unix file systems do not have a concept of creation vs modification time at all. You can only get "last modified" time. Windows NTFS does have the concept of: creation time, last accessed time, and last modification time. see (sic) ...

If I am reading your statement correctly, you are saying that the ctime, mtime, and atime do not exist under the historical unix file system inode. Is this correct?

So: some file systems track "creation time". Unix file systems are not one of them. Normally the "last modified" time is sufficient. And that's a good thing as that is all Perl allows you to get to with the standard built-in functions. But as a "nit" here, I point out that some filesystems do track creation time.

I can concur with that. Reference: "the ctime test may actually return the creation time". I would, however, ask what creation time signifies. What happens when a file is restored? Does the attribute follow on a copy? How about when the method of saving a file is "save new, rename old, rename new, remove old"?

I think that in the context we are discussing (OP's question), these concepts are for the most part equivalent.

Update:

Cleaned up my thoughts and wording

--MidLifeXis


In reply to Re^3: How to get the File creation date by MidLifeXis
in thread How to get the File creation date by soubalaji

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.