Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

2 Answers 2

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

Your Answer

 
discard

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.