|
Author |
Message |
|
|
Posted : Sun, 16 November 2008 18:34:25
Subject :
Finding a certain date.
Hello,
Im very close and need just a little help:
----------------------------------------
find ~ -size +1b -mtime -l -ls | sort g
----------------------------------------
I can find everything modified within the last 24 hours, but i need to find something that i did in october.
Thanks.
|
|
|
|
xoxoxo
|
Posted : Mon, 17 November 2008 06:33:12
Subject :
Re: Finding a certain date.
Well i almost got it, but i just keep on missing the dates that i need.
--------------------------------------------------------------------
find ~ -type f -size +1b -mtime -25 ! -mtime -20 -exec ls -la {} \;
--------------------------------------------------------------------
is there a command where i can just specify the month and date and year that i want? Like a %d%m%y expression?
|
|
tophandcwby
|
Posted : Mon, 17 November 2008 14:31:49
Subject :
Finding a certain date.
Say the date you are looking for is Oct. 8, 2008
find ~ -true -exec ls -l {} \; | grep 2008-10-08
|
|
xoxoxo
|
Posted : Tue, 18 November 2008 06:03:50
Subject :
Finding a certain date.
How can i find another date along with the one that you provided? Is their a way to specify the time that it was modified as well?
|
|
tophandcwby
|
Posted : Tue, 18 November 2008 11:57:58
Subject :
Finding a certain date.
You need to use regular expressions with the call to grep. See
man 7 regex
or do a www.google.com/linux on regular expressions.
As an example, in a subdirectory you want to find all the files created on August 21 and August 28.
ls -l | grep "2008-08-2[18]"
For time, say the same example but you also want the time to be between 10:00 and 13:00
ls -l | grep "2008-08-2[18] 1[0-2]"
which would get you the files with mod times between 10:00 and 12:59
|