1

how do I filter out permissions errors out of find / | grep foo output?

deadprogrammer
  • 1,691
  • 7
  • 24
  • 25

1 Answers1

2

Well, I think find / -iname '*foo*' would be a better command. But you can redirect stderr to /dev/null to get rid of all errors. Or redirect stderr to stdout and then filter with grep:

find / 2>/dev/null | grep foo
find \  |& grep 'No Such'
Kyle Brandt
  • 83,619
  • 74
  • 305
  • 448