Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

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.