LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Scripting Q

[ILUG] Scripting Q

Niall O Broin niall at linux.ie
Fri May 6 16:35:18 IST 2005


On 6 May 2005, at 16:09, Ciaran Johnston wrote:

> To be really pedantic, of course this doesn't answer the question, 
> because
> -mtime shows the last modification time, whereas an objective reading 
> of
> the question reveals that the requirement was to find the age of the 
> file,
> not the time since last access.

As we're being pedantic, mtime doesn't measure the time of last access, 
but rather the time of last modification - you may have been thinking 
of atime. And IME when people ask "How old is that file ?" they mean 
"When was it last modified?".

> Kevins answer does the same, so to answer
> the "real" question, whether or not it was the intended question, I
> haven't got a clue how to find the "creation time" of a file, and 
> indeed I
> don't think it is possible.

It's not on Unix, and in the absolute, is it even a meaningful 
question. If the file's data has changed completely since it was first 
created, of what relevance is the first creation ?

If we once had a file /path/to/file which was erased and then later a 
new file was created called /path/to/file whose content was then 
changed, what is the age of that file? Do we date it by its last 
modification date, or its most recent creation date? Why not its 
original creation date?


The former I'd say is the most common and useful interpretation.




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell