Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 01-31-2012, 03:38 AM   #1
Registered: Oct 2010
Posts: 606

Rep: Reputation: 59
Checking File's Creation Time

An excerpt from the man page of find command:

              Measure  times  (for -amin, -atime, -cmin, -ctime, -mmin, and -mtime) from the beginning of today rather than from 24
              hours ago.  This option only affects tests which appear later on the command line.
wherein none of these time-stamps "-amin, -atime, -cmin, -ctime, -mmin, and -mtime" can tell when a particular file/directory was original/first-time created.

I want to look for files that were created (I am not referring to change/modification/access times here) 2 hours ago from now or 1 PM today, for example.

Am I clear? Let me say it in some other words. I am not interested in the time-stamps that tell us about a file that was changed/modified/accessed at a particular time. Rather, I am interested in a file that was originally created (came into existence first time) at a specific time. No matter how many times it was later changed/modified/accessed.

I created this file "data" several days back but am not able to figure out when I did that:

ls -l data
-rw-r--r-- 1 lsdev lsurf 114594 Jan 30 02:52 data

ls -lc data
-rw-r--r-- 1 lsdev lsurf 114594 Jan 30 02:52 data

ls -lu data
-rw-r--r-- 1 lsdev lsurf 114594 Jan 30 03:46 data

stat data
  File: `data'
  Size: 114594          Blocks: 232        IO Block: 4096   regular file
Access: 2012-01-30 03:46:27.000000000 -0800
Modify: 2012-01-30 02:52:34.000000000 -0800
Change: 2012-01-30 02:52:34.000000000 -0800

Last edited by devUnix; 01-31-2012 at 04:00 AM.
Old 01-31-2012, 05:37 AM   #2
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Rep: Reputation: 103Reputation: 103

No such thing.

The best you can do is go with modification times.

Then figure out the difference between the two.

Something like this....

find / -mtime +2 & -mtime -3 > log

dif -u log1 log2


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 On
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 > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:44 PM.

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