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?

link|improve this question

0% accept rate
feedback

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

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

2 Answers

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

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

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
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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