Just a side note: the 'c' in ctime doesn't stand for "create" (a common misconception, though). Better think of it as "change", as it refers to when the file's status (i.e. inode meta information) was last changed.

Now, you may wonder what the difference then is to modification time (mtime)...  The latter isn't updated when you change the mode/owner/group of the file, or the link count changes, etc.  For example:

#!/bin/sh rm -f foo touch foo stat foo sleep 3 echo bar >>foo stat foo sleep 3 chmod o-r foo # changes ctime only stat foo

Output:

File: `foo' Size: 0 Blocks: 0 IO Block: 4096 regular empt +y file Device: 811h/2065d Inode: 36356982 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1000/ almut) Gid: ( 1000/ almu +t) Access: 2010-05-15 11:08:00.000000000 +0200 Modify: 2010-05-15 11:08:00.000000000 +0200 Change: 2010-05-15 11:08:00.000000000 +0200 File: `foo' Size: 4 Blocks: 8 IO Block: 4096 regular file Device: 811h/2065d Inode: 36356982 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1000/ almut) Gid: ( 1000/ almu +t) Access: 2010-05-15 11:08:00.000000000 +0200 Modify: 2010-05-15 11:08:03.000000000 +0200 <--- Change: 2010-05-15 11:08:03.000000000 +0200 <--- File: `foo' Size: 4 Blocks: 8 IO Block: 4096 regular file Device: 811h/2065d Inode: 36356982 Links: 1 Access: (0640/-rw-r-----) Uid: ( 1000/ almut) Gid: ( 1000/ almu +t) Access: 2010-05-15 11:08:00.000000000 +0200 Modify: 2010-05-15 11:08:03.000000000 +0200 Change: 2010-05-15 11:08:06.000000000 +0200 <---

As you can see, the file was modified before it had been created... ;)


In reply to Re^3: Error executing by almut
in thread Error executing by Nathan_84

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.