Re: [OT]: Ho wto find files created on a specific date

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Craig White wrote, On 04/02/2008 10:49 AM:
On Wed, 2008-04-02 at 10:40 -0400, Todd Denniston wrote:

cd /tmp
touch --date="March 20" test20
touch --date="March 21" test21
find /opt/html/ -type f -newer test20 > list1
find /opt/html/ -type f -newer test21 > list2
----
nice...this is very elegant

I need to file this away somewhere that I actually have a chance to find
this when I need it.

Thanks

Craig


and after seeing Mr. Haney's message I looked at the find man page a bit...

find /opt/html/ -type f -newer test20 -not -newer test21

same list as I got from the diff |grep, but without the need to sed, and it _probably_ could be carefully combined with the -exec option of find to do the rm.

Open Source Scripting on the Fedora list.:)

--
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux