Looking for files older than n number of days?

Paul Schmehl pauls at utdallas.edu
Mon Jun 6 22:07:24 GMT 2005


--On Sunday, June 05, 2005 23:47:44 -0400 Francisco Reyes 
<lists at natserv.com> wrote:

> On Sun, 5 Jun 2005, Paul Schmehl wrote:
>
>> Use negation.
>> find ! -n 10 blah
>
> Could not get it to work with anything like that syntax.
> For starters I don't see "-n". I see newer but that seems to compare to
> another file.. Is this something you have done in the past?
>
All I gave you was an example of how negation works, not a specific command 
for find.

Try this: find {path} ! -newer {path to file with date you want}

Or you can touch a file with the date you want.  Then use that file as the 
"key" for find to know what "! -newer" means.

Take a look at this:

<http://www.softpanorama.org/Tools/Find/find_mini_tutorial.shtml>

There's tons of ways to do what you want.  You just need to choose one that 
you like.

Paul Schmehl (pauls at utdallas.edu)
Adjunct Information Security Officer
University of Texas at Dallas
AVIEN Founding Member
http://www.utdallas.edu/ir/security/


More information about the freebsd-questions mailing list