There are some directories that can cause problem with find, and especially find /
. These are directories in which the OS creates files which are not really files. Among these directories are /proc
/sys
/run
.
The thing is that if you are doing something like find / -exec grep
, you can mess up the system real bad if you crawl some of these systems.
So how can I tell find to skip these directories without listing them. Because someone just may decide to create a new directory like this. Rather then rely on a list I would rather have a test for the directory and an option to exclude directories that fail this test.