Results 1 to 7 of 7
The man time shows:
-ctime n
Files status was last changed n*24 hours ago. See the comments for -atime to understand how rounding affects the interpreta-
tion of file status ...
- 04-03-2009 #1Just Joined!
- Join Date
- Apr 2009
- Posts
- 4
find command ctime vs. mtime vs. creation time
The man time shows:
-ctime n
Files status was last changed n*24 hours ago. See the comments for -atime to understand how rounding affects the interpreta-
tion of file status change times.
-mtime n
Files data was last modified n*24 hours ago. See the comments for -atime to understand how rounding affects the interpretation
of file modification times.
Is there a difference between "changed" vs. "modified"? Is a data change also a status change? I am looking for a way to find files based on creation time. Does anyone know if there is such?
- 04-04-2009 #2
hope this solution works out for you
create a file using the touch command and assign the file the date from which date you want to search a file.
now excecute 'find' cmd with newer option
ex: find <location> -newer <file created with touch>
this would list all files from the date specified with touch cmd.
- 04-06-2009 #3Just Joined!
- Join Date
- Apr 2009
- Posts
- 4
assign the file the date
Thanks for you reply. I don't know how to, "assign the file the date." Could you please show me the command?
- 04-06-2009 #4
when ever you want to know how to use a commnad refer to the man pages. It's really very simple. The touch commnad has a '-t' option which can be used to assign a partcular date to a file.
Syantax : touch -t [[CC]YY]MMDDhhmm[.ss]
for example to give a file a date of 7/04/04
simple do this
#touch -t 20040407 filename.
- 04-07-2009 #5Just Joined!
- Join Date
- Apr 2009
- Posts
- 4
Thanks
Thank you very much, this is a perfect solution to my problem!
- 04-10-2009 #6
I have to admit I didn't know the answer to this myself... I tried a Google search and the answer I came up with is this:
ctime is the last time the file's inode was changed: that would be, for instance, the file's size, permissions, etc. I don't know if it includes updates to the atime... (I would guess not) But it does include modifications to the file's data, I guess.
mtime is the last time the file's contents were modified - the last time somebody did a write() to the file (or certain types of seek(), truncation, etc.)
ctime changes any time mtime changes, but there are some operations that will change ctime but not mtime.
- 04-14-2009 #7Just Joined!
- Join Date
- Apr 2009
- Posts
- 4
thank you!!!


Reply With Quote

