> 
> When I tried doing the line you defined above, I get this output:
> 
> find: paths must precede expression
> Usage: find [path...] [expression]
> rm: too few arguments
> Try `rm --help' for more information.
> 
> So I did it this way:
> 
> find /var/log -type f -mtime 5 | xargs rm
> 
> And it works.  The only thing that catches my attention is that in the
> 'find' man page, '-mtime' says:
> 
>  -mtime n
>               File's data was last modified n*24 hours ago.
> 
> This would seem to me to mean a static multiplyer.  In other words,
> '-mtime 30' would be any logs created exactly 30 days ago - not 31, not
> 29.
> 
> How would you state 'anything over 30 days'?  And why did you create the
> syntax the way you did above; with the '.' after 'find' and the order of
> commands?
> 
> Thanks!
> 

find /var/log -type f -mtime +30

will find any file in the /var/log directory that is more than 30 days
old.  Find expects one argument which is a path to a directory to start
the search (which can be /var/log or . if your cwd is /var/log), then
there are tons of possible arguments.  The path must be given first, but
the arguments can usually be given in any order (unless you get fancy).

John

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to