Tag Archives: Find

How to ignore “find: cannot read dir /foo: Permission denied”

If you run the following command on a Unix system, depending on your permissions and other stuff, you might see a lot of errors.

$ find / -name "tar"

In my case I got 8 regular findings and 63 lines of “find: cannot read dir /foo: Permission denied”. Quite a lot of noise I really don’t care about. Using my new knowledge about streams it is easy to get rid of all that though. Just pipe stderr into /dev/null.

Continue reading How to ignore “find: cannot read dir /foo: Permission denied”