How do I run a find command to find php files but I exclude a folder i.e. /usr/local/bin?
Asked
Active
Viewed 963 times
2 Answers
2
Prune it.
find some/dir \( -type d -path some/dir/some/other/dir -prune -o -name '*.php' -print \)

Ignacio Vazquez-Abrams
- 45,939
- 6
- 79
- 84
0
You can use the find command in linux to do this. Something like this should work.
find / \! -path "/usr/local/bin/*" -name "*.php"

barryj
- 978
- 1
- 5
- 8