How do I run a find command to find php files but I exclude a folder i.e. /usr/local/bin?

link|improve this question

71% accept rate
feedback

2 Answers

Prune it.

find some/dir \( -type d -path some/dir/some/other/dir -prune -o -name '*.php' -print \)
link|improve this answer
feedback

You can use the find command in linux to do this. Something like this should work.

find / \! -path "/usr/local/bin/*" -name "*.php"
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.