Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

how do I filter out permissions errors out of find / | grep foo output?

share|improve this question
up vote 2 down vote accepted

Well, I think find / -iname '*foo*' would be a better command. But you can redirect stderr to /dev/null to get rid of all errors. Or redirect stderr to stdout and then filter with grep:

find / 2>/dev/null | grep foo
find \  |& grep 'No Such'
share|improve this answer
find / -iname 'foo', definitely ;-) – David Z May 22 '09 at 17:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.