How to prune more than one directory using GNU find
I know how to prune one directory with find. How do I prune two or more directories?
Code:
find * -wholename 'dirname' -prune -o -print |
find / \( -wholename "/media/*" -o -wholename "/usr/*" -o -wholename "/opt/*" -o -wholename "/etc/*" -o -wholename "/home/*" -o -wholename "/lib/*" -o -wholename "/SuSEdvd*" -o -wholename "/lib64*" -o -wholename "/proc/*" -o -wholename "/sbin/*" \) -prune -o -print
The results are pruned, but the directories are still transversed. If you don't have permissions for a directory of file in one of the pruned patterns, an error message is printed (via stderr ). |
All times are GMT -5. The time now is 03:05 AM. |