Super User is a question and answer site for computer enthusiasts and power users. 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

whenever i execute find command for searching for some file

like

find . -name "abc"

specially from the root,it displays lots of "cannot open or cannot search "

how can suppress those messages?is there any flag for that?

share|improve this question

migrated from stackoverflow.com Apr 1 '11 at 18:42

This question came from our site for professional and enthusiast programmers.

You can direct the standard error stream to /dev/null, viz:

find . -name "abc" 2>/dev/null
share|improve this answer

you can suppress by piping stderr(2) to /dev/null or to a log file for later viewing

find . -name "abc" 2>/dev/null
find . -name "abc" 2>/errorlog.txt
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .