Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

I need to get rid off "access denied" messages which fills my find output. I've read man find (maybe not too carefully, hit me) and cannot find anything like

-s/--silent or -q/--quiet command line key.

share|improve this question

The easiest way would be to redirect find's errors with `2>/dev/null', but that may hide some errors you still might want to see, as chris_l mentioned.

If you want a cleaner solution, you can try something like

find foo/ \( -type d -and -not -executable -prune \) -o -print

which tells find not to descend into directories of which it cannot read the contents.

share|improve this answer

find ... 2>/dev/null

(Note however, that this will redirect all errors, not just "access denied")

share|improve this answer
find /path -name "foo" 2>&1 | grep -v denied 

This will get rid of all Permission denied errors. Similarly you may edit the code above depending on the situation

share|improve this answer

Your Answer


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