1

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?

4

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

find . -name "abc" 2>/dev/null
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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