Every systems administrator faces an unavoidable truth. It's something that puts everyone in the field on equal footing; and each one of us will be confronted by this truth at least once in our careers.
No matter how good you are, someone else is better than you with the find command.
With that said, here's a quick way to grab the filename and size of every file on a Netapp mount, avoiding the .snapshot directories. This method only works with the GNU version of find.
find . -name ".snapshot" -prune -o -printf "%p:%s\n"
If you're expecting thousands of lines of output, don't forget to pipe your output to the
Chris Gerhard also posted a find invocation that prevents searching through remote filesystems.
And for the beginners, here's a link to the Find Tutorial.
Show off your
find skills. Post your favorite use here.