[SGVLUG] shell script & nawk exposure

Bryan D Howard bryan at jetcafe.org
Wed Feb 22 17:45:01 PST 2006


"Emerson, Tom" <Tom.Emerson at wbconsultant.com> writes:
> and in the oh-no-second after hitting send, I realized this indicated MODIFICATION time, NOT the time the file was CREATED -- I don't think there is such a beast, is there? ("ctime" would seem to to be the obvious choice, but apparently the ctime is the last change-of-status time, not "creation" time)
> 
> In practice, "ctime" may be sufficient -- what exactly does "change of status" mean, and/or what actions actually change it?  (change of ownership or permissions, perhaps?)  Such a change may never happen in practice, so the ctime effectively remains the creation time...


http://www.faqs.org/faqs/unix-faq/faq/part3/section-1.html

Think about it.  If you use vi to edit a file, it gets editted in
place (that is, the inode remains the same) - in this case, maybe a
"creation timestamp" might have some meaning.

On the other hand, if you edit it some other way (say, emacs), what's
likely to happen is the original file is renamed (thing~) and a new
file (inode) is created with the new contents.  What do you want to
define as the creation time for the file?  Why?  Why not some other
definition?

You can see that there isn't an obvious single answer that would be
meaningful.

{Bryan}
-- 
Bryan D Howard
<bryan at alumni.caltech.edu>


More information about the SGVLUG mailing list