This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: -exec on find(1) broken
Paul McFerrin wrote:
> Well, I finally got it!
>
> find . -type f -mtime +18 -exec /bin/echo {} \; | more
>
> is the correct syntax. Now I just replace "/bin/echo" with "/bin/rm"
> and I ready to go.
That's still horribly overcomplicated and inefficient. Use "find .
-type f -mtime +18" to see what the results would be and "find . -type f
-mtime +18 -delete" to delete them. It's much more efficient to let
find do the deleting than worrying about creating a bunch of echo or rm
child processes.
Brian
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/