Friday, December 12, 2008

"find" and "Permission denied"

I was trying to run "find" on a directory, looking for a perl script. Because of which user I was running it as, I was getting a bunch of "Permission denied" errors.

I thought I could just tack on "| grep -v "Permission denied" at the end of my command, but no luck. I fruitlessly checked to see if there would be something in the find man page as well.

I came across this site:

The correct answer to what I was trying to accomplish was

$ find / -name -print 2>/dev/null

No comments: