Re: delelte dirs older than 2 hours by find with solaris 9



Tim Bradshaw <tfb@xxxxxxxx> wrote:
On 2006-11-27 20:46:45 +0000, Darren Dunham <ddunham@xxxxxxxxxxxxxxxx> said:

Even if you don't have access to a 'find' that accepts minutes, you can
use 'touch' to create a file of the correct age. Then use find -newer
(or ! -newer) to select files newer or older than that point in time.

Now that is a really neat trick. Do you know (could be easily checked
obviously but I'm not near a Solaris box that is on) if it is smart
enough not to stat the file repeatedly?

Could look at the code, but no I think it just stats the file once to
get a time (rather like the -mtime and others generate a time) and that
is checked against the files. I only see one stat on a test.

--
Darren Dunham ddunham@xxxxxxxx
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
.



Relevant Pages