LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-11-2009, 02:28 PM   #1
ashu_linux
LQ Newbie
 
Registered: May 2009
Posts: 2

Rep: Reputation: 0
Any command to check the creation time of a file?


hi,

Is there any command in Linux, which lets you know the creation time of file?
Stat only gives info on Access time, modification time and change time.
 
Old 05-11-2009, 02:43 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Hi, welcome to LQ,

And no, there is no concept of a creation time in Linux (or Unix).


Cheers,
Tink
 
Old 05-11-2009, 03:03 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
There are only those three properties....When you create a file, they are all set to the creation time. But, that original time is not preserved anywhere.
 
Old 05-11-2009, 03:34 PM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.3, Oracle Linux, Mint
Posts: 9,690

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
This somewhat controversial concept is however starting to emerge in some Unix filesystems like UFS2/st_birthtime, ZFS/crtime and Ext4/crtime.
eg on OpenSolaris:
Code:
$ touch foo
$ date >foo
$ ls -l -% all foo
-rw-r--r--   1 jlliagre      31 may  11 22:30 foo
		timestamp: atime	 May  11 22:30:05 2009 
		timestamp: ctime	 May  11 22:30:07 2009 
		timestamp: mtime	 May  11 22:30:07 2009 
		timestamp: crtime	 May  11 22:30:05 2009
 
Old 05-11-2009, 04:52 PM   #5
NeddySeagoon
Gentoo support team
 
Registered: May 2009
Location: 56N 3W
Distribution: Gentoo
Posts: 178

Rep: Reputation: 40
ashu_linux,

If your filesystem is always mounted with the noatime option, then the access time given by stat will be the create time.
 
Old 05-12-2009, 09:36 AM   #6
ashu_linux
LQ Newbie
 
Registered: May 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Thumbs up Thanks & Awesome

thanks to all...
Really great info Jiliagre and Neddy..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
File System Creation Time meshcurrent Linux - General 5 02-08-2009 11:46 AM
file creation time dina3e Linux - Newbie 2 03-25-2008 12:45 PM
File Creation Time? enine Linux - General 9 05-17-2006 11:46 AM
list file creation time allelopath Linux - General 2 08-02-2005 09:02 PM
Time of creation of a file proxyserver Linux - Software 2 04-11-2004 10:29 AM


All times are GMT -5. The time now is 10:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration