On ubuntu, i search for "ubuntu" locations
find / -name ubuntu
I get lots of lines with "Permission denied" I try to remove the lines
find / -name ubuntu | grep -v Permission
I still get the unwanted lines
How to fix this?
On ubuntu, i search for "ubuntu" locations
find / -name ubuntu
I get lots of lines with "Permission denied" I try to remove the lines
find / -name ubuntu | grep -v Permission
I still get the unwanted lines
How to fix this?
It's because the errors from find
are going to stderr. You can redirect stderr to stdout as well and then the filtering with grep would work.
find / -name ubuntu 2>&1 | grep -v Permission
1 represents standard output and 2 represents standard error. 2>&1
denotes "redirect stderr to wherever stdout goes".