December 7, 2008

Read the Man Page

Think you know your command-line tools? Discover a faster way to delete files with find—and why reading the man page still pays off.

For years I have been using the syntax:
$ find . -type f -exec rm {} ;
For some reason I took the time to read the man page for find today and guess what:
$ find . -type f -delete
Does the exact same thing and it is almost instant. Lesson learned, every now and again read the man page.