LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-10-2012, 07:35 PM   #1
devUnix
Member
 
Registered: Oct 2010
Posts: 606

Rep: Reputation: 59
File Creation Time


Hi!

Is there any way to identify or figure out the creation time of a file / directory? Per my research on the subject, I have found that Unix/Linux does not store the creation time of a file/directory anywhere on the system. However, the same can easily be obtained on a Windows System. It maintains Creation Time as well as other time-stamps such as Last Change and Last Access.

Could there just be a to do that on a Unix / Linux system?
 
Old 03-10-2012, 08:16 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by devUnix View Post
Unix/Linux does not store the creation time
That is correct and you answered your own question already: intercepting syscalls using LD_PRELOAD tricks, inotify or the audit service may yield some results but in UNIX it is not possible to retrieve creation time from the file system itself. (And best not compare Microsoft products with Linux.) If you're trying to solve a problem then here's your chance to elaborate.
 
1 members found this post helpful.
Old 03-10-2012, 08:34 PM   #3
devUnix
Member
 
Registered: Oct 2010
Posts: 606

Original Poster
Rep: Reputation: 59
Quote:
Originally Posted by unSpawn View Post
(And best not compare Microsoft products with Linux.) If you're trying to solve a problem then here's your chance to elaborate.
Well, not really meant to compare Windows OS with Unix or Linux. Just an example is given so that those who might not know, may know it too.
 
Old 03-11-2012, 12:04 PM   #4
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,339

Rep: Reputation: 260Reputation: 260Reputation: 260
In newer versions of stat there is already a field Birth: - and it should show the crtime of ext4 file systems AFAIK. But I never saw anything else displayed there besides a hyphen. Maybe some support is still missing in the kernel.
 
3 members found this post helpful.
Old 03-11-2012, 03:34 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Reuti View Post
In newer versions of stat there is already a field Birth: - and it should show the crtime of ext4 file systems AFAIK.
Awesome, thanks.
[0] http://computer-forensics.sans.org/b...t-2-timestamps
[1] http://snippets.dzone.com/posts/show/12121
 
1 members found this post helpful.
Old 03-12-2012, 05:18 AM   #6
devUnix
Member
 
Registered: Oct 2010
Posts: 606

Original Poster
Rep: Reputation: 59
Quote:
Originally Posted by Reuti View Post
In newer versions of stat there is already a field Birth: - and it should show the crtime of ext4 file systems AFAIK. But I never saw anything else displayed there besides a hyphen. Maybe some support is still missing in the kernel.
Excellent work!

So, at least EXT4 is what we need to figure out the Creation Time or Birth Date/Time of a file.

Thanks! Rated for your effort!
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] how to get the file creation time sudeep_mansh Linux - General 3 11-23-2010 10:56 PM
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 - Server

All times are GMT -5. The time now is 07:53 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