Finding a certain date.

Forum Index » Forums » New to Linux
Author Message
Joined: Oct 31, 2008
Posts: 5
Other Topics
Posted Nov 16, 2008 at 6:34:25 PM
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.
Back to top Profile Email Website
xoxoxo
Joined Oct 31, 2008
Posts: 5

Other Topics
Posted: Nov 17, 2008 6:33:12 AM
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?
Back to top Profile Email Website
tophandcwby
Joined Apr 10, 2008
Posts: 81

Other Topics
Posted: Nov 17, 2008 2:31:49 PM
Say the date you are looking for is Oct. 8, 2008 find ~ -true -exec ls -l {} \; | grep 2008-10-08
Back to top Profile Email Website
xoxoxo
Joined Oct 31, 2008
Posts: 5

Other Topics
Posted: Nov 18, 2008 6:03:50 AM
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?
Back to top Profile Email Website
tophandcwby
Joined Apr 10, 2008
Posts: 81

Other Topics
Posted: Nov 18, 2008 11:57:58 AM
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
Back to top Profile Email Website
Forum Index » Forums » New to Linux