![]() |
|
|
|
|
|||||||
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| search by modified date | kotasateesh | Shell Programming and Scripting | 4 | 3 Weeks Ago 06:59 AM |
| date search | thirumaran | Shell Programming and Scripting | 5 | 09-23-2007 11:54 PM |
| Search files between a date range | zcanji | Shell Programming and Scripting | 4 | 09-05-2007 12:38 AM |
| Shell script: last modification date for a file | onlyc | UNIX for Dummies Questions & Answers | 4 | 07-06-2006 10:01 AM |
| command for modification date of a file | scampsd | UNIX for Dummies Questions & Answers | 5 | 12-28-2005 04:14 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Search by modification date
Hi
I'd like to know if is it possible to find files given a certain modification date (say, 01-05-2006, that's 1st of May 2006) I can calculate the days backward: Code:
find / -ctime 23 Thanks |
| Forum Sponsor | ||
|
|
|
|||
|
mtime makes more sense than ctime because it considers the file last modification time instead of change of file status, but I still get the same results
I would express my question as: How can I find files modified on 01-05-2006 on my computer? |
|
|||
|
Dunno if I understood your question right, but anyway try below.
Find no of days difference (Difference.Days=Current.Date-Search.Date [E.g, No.of.days.difference between 20060525 and 20060520 is 5]). Say you wanna search your file in a directory called "XXX" exactly 5 days before. find XXX -mtime 5 -depth -type f The above command will list you all files in XXX modified 5 days before. Karthik |
|
|||
|
Yes, if I want to search files modified 5 days ago in my computer I type:
Code:
find / -mtime 5 2>/dev/null But, what if I want to search for files modified on 01-01-1999 ? |