![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Search files between a date range | zcanji | Shell Programming and Scripting | 7 | 05-27-2009 01:31 PM |
| search by modified date | kotasateesh | Shell Programming and Scripting | 4 | 06-24-2008 10:59 AM |
| date search | thirumaran | Shell Programming and Scripting | 5 | 09-24-2007 03:54 AM |
| Shell script: last modification date for a file | onlyc | UNIX for Dummies Questions & Answers | 4 | 07-06-2006 02:01 PM |
| command for modification date of a file | scampsd | UNIX for Dummies Questions & Answers | 5 | 12-28-2005 08:14 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | 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 |
|
||||
|
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 ? |
![]() |
| Bookmarks |
| Tags |
| mtime |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|