[OT]: Ho wto find files created on a specific date
Patrick O'Callaghan
pocallaghan at gmail.com
Wed Apr 2 15:03:05 UTC 2008
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
More information about the users
mailing list