I noticed on my SUN workstation (running Solaris 2.6 OS)that some of my files had odd dates to them. Is there a UNIX cmd that can change the creation date to reflect the true date created? [sig][/sig]
Hello. Normally a Unix system saves the last access time, last modification time of contents, and last modification time of i-node. You can change any of'em with the [tt]touch[/tt] command.
you could look at perl (i'm sure you can do it in the OS but i haven't looked hard enough to find it yet) t's got all sorts of facilities to handle file creation/modification/access times ...
midrisi, what ElgisRamon was saying is that UNIX doesn't store "creation" time, it stores "access", "modification", and "change" time (see his post on 'touch' and my post on 'stat'). Touch doesn't modify the creation time, it changes access and modification time for a file.
The ironic thing is that he begins his remarks with "can't all you read?", and yet he was the first one to reply to this post.
Elgis meant "Why didn't you read my previous reply before adding to the thread?" And he has a point really. <smile> Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
The "touch" command can be used to change the "accessed" time or the "modified" time of a file. Mike
"Experience is the comb that Nature gives us after we are bald."
Is that a haiku?
I never could get the hang
of writing those things.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.