LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-23-2010, 10:08 PM   #1
sudeep_mansh
Member
 
Registered: Jun 2008
Posts: 33

Rep: Reputation: 0
how to get the file creation time


Hello,
I want to extract the file creation time. How to get it. I am using fedora core 4.
Can anybody help...
 
Old 11-23-2010, 10:09 PM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
The Linux file systems do not record the file creation time.
 
Old 11-23-2010, 10:34 PM   #3
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
Although you can't get the time the file was created with 100% accuracy, you can get information on the last time the file was accessed, modified (contents of the file changed), or changed (attributes of the file changed) with the stat command (run "man stat" to see how to use the command). If the file hasn't been modified or changed since it was created, then those times will be the creation time. That may be enough to suit your purpose, but just remember, it isn't a surefire way. If you know you never modified the file since it was created, then you can use those times. But, as stress_junkie said, the creation time isn't recorded in Linux filesystems.

HTH

Forrest

p.s. you should really consider upgrading to a supported version of Linux. FC4 isn't supported. If you need something that supports older hardware, there are distros out there that are supported that do. If not, I highly recommend upgrading to Fedora 14.
 
Old 11-23-2010, 10:56 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Read this - the referenced patches are already available.

It should be noted that crtime actually is maintained in ext4 already. Getting the datum out is the problem.
 
1 members found this post helpful.
  


Reply



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 On
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

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:31 PM.

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
Open Source Consulting | Domain Registration