How to ignore the find command "permission denied" error

  • Background: When using the find / -name, will print a lot with "permission denied" error message useless
  • Solution:
find / -name art  2>&1 | grep -v "Permission denied"
  • Analysis: means to redirect the standard error output to standard output, grep -v means "Get the contrary," specific reference grep command
  • Reference Address: Address
Published 75 original articles · won praise 48 · Views 350,000 +

Guess you like

Origin blog.csdn.net/KingJin_CSDN_/article/details/95944680