delorie.com/archives/browse.cgi | search |
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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |