LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   search based on time stamp ? (https://www.linuxquestions.org/questions/linux-newbie-8/search-based-on-time-stamp-154646/)

massai 03-07-2004 01:32 PM

search based on time stamp ?
 
Hi,

This must be trivial to most of you, but I searched the man pages on "Find", "Locate" and "grep" as well as did some googling and didn't any usefull examples to get me started.

I would like to find all files that were edited/modified between 9:00am -> 12:30pm today.
How can we do this (without using the KDE front end)?

(P.S. I do not want all files modified within n -- 24 hour periods. Only a specific time bracket of a specific date)

--

Mik 03-07-2004 02:50 PM

Well you could create a file with the begin time stamp and one with the end time stamp with the touch command.
And then compare each file in a loop with -ot and -nt. You can read the advanced bash scripting guide for more info on -ot and -nt.
Either way I think you need to compare each file in a loop cause I don't think there is any switch in any of those commands which finds files both newer and older then a certain time stamp.


All times are GMT -5. The time now is 03:49 AM.