Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding Range of Modification Dates

Status
Not open for further replies.

lampshade

Programmer
Nov 20, 2008
6
US
Hey all, was wondering if i could get any help with this:

Code:
find ~ -true -exec ls -l {} \; | grep 2008-10-01

those commands finds all the files that were modified on that date in my home directory. How can i find one more date? I've tried to grep another date similar to the one above but it doesnt work!

Also i want the time to be 00:00

How can i do this?

Any help is very much appreciated!

-Thanks
 
Code:
find ~ -true -exec ls -l {} \; | [blue]e[/blue]grep '2008-10-01[blue]|2008-12-25[/blue]'
Use egrep, and a list of dates separated by |


--
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
 
Why the -true?

If you're only intersted in files, consider adding -type f.

Also, to check for the time too, try something like:

Code:
find ~ -type f -exec ls -l {} : | egrep '2008-(10-01|12-25) 00:00'

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top