Smart questions
Smart answers
Smart people
Join Tek-Tips Forums

Member Login

Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

boobam (IS/IT--Management) (OP)
24 Sep 00 15:52
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?
Helpful Member!(2)  ElgisRamon (MIS)
24 Sep 00 16:11
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 touch command.

I hope it works...
Guest (visitor)
3 May 01 3:54
Hi I would like to know how to get unix file creation date in Unix. I am using Sun OS. All I get is the latest modification dates and time.
GoldenEternity (TechnicalUser)
6 May 01 5:25
If it is present on your system, the 'stat' command will print this information. Here's a sample:

$ stat /etc/protocols
  File: "/etc/protocols"
  Size: 1567         Filetype: Regular File
  Mode: (0644/-rw-r--r--)         Uid: (    0/    root)  Gid: (    0/    root)
Device:  3,1   Inode: 3984      Links: 1
Access: Sat May  5 17:42:39 2001(00000.08:42:29)
Modify: Wed Jan 12 15:18:52 2000(00479.10:06:16)
Change: Thu Feb 22 12:34:51 2001(00072.12:50:17)
jad (Programmer)
16 May 01 6:34
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 ...
ElgisRamon (MIS)
31 May 01 15:45
Can´t all you read... the typical Unix system doesn´t store the creation time of files anywhere... then there is no way you can get or change it!

I hope it works...
Unix was made by and for smart people.

midrisi (Programmer)
2 Jun 01 10:19
Through touch command u can change the creation date of file ;

Let suppose following file

-rwxr-xr-x   1 msi      satdev      1237 Mar 24 19:06 user

touch user

It will work.
-rwxr-xr-x   1 msi      satdev      1237 Jun  2 19:51 user
GoldenEternity (TechnicalUser)
2 Jun 01 16:19
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. ;)
MikeLacey (MIS)
4 Jun 01 9:00
Elgis meant "Why didn't you read my previous reply before adding to the thread?" And he has a point really. <smile>

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.

Guest (visitor)
7 Feb 02 16:40
i read the whole message thread and no one talks about what "change" time is, and how to modify that attribute.
MikeLacey (MIS)
20 Feb 02 11:47
The "touch" command can be used to change the "accessed" time or the "modified" time of a file.

"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.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close