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

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

 



On Wed, 2008-04-02 at 07:49 -0700, Craig White wrote:
> 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

Alternatively:

find /opt/html -daystart -type f -ctime N -print0|xargs --null rm -f

where N is the number of days since the required date (starting with 1 =
yesterday).

Test with 'ls -lc' instead of 'rm' of course :-)

poc


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

  Powered by Linux