Pages

Tuesday, December 11, 2012

find files between two dates

Here's a quick tip for how you can find a file between two dates.
Suppose you are looking for a file you know you worked with last friday. At the time of writing this would be on december 7th. Using the find command you can go to your terminal and add the following code:


find . -type f -newerat "2012-12-07" -not -newerat "2012-12-08"


This would search for files acessed between dec. 7th and dec. 8th.
This code snippet also shows an example of how to use the -newerXY parameter of the find -command.

No comments:

Post a Comment