This may result in a very long statement, but one way can be
Code:
find . \( -wholename ./dir_one -o -wholename ./dir_two \) -prune -o -name "*.php" -print -o -name "*.html" -print -o -name "*.htm" -print
this uses the -prune action of find, to exclude from the search the directories enlighted in blue. If you want to add more directories to exclude, simply add them inside the parentheses with the same construct, as in
Code:
find . \( -wholename ./dir_one -o -wholename ./dir_two -o -wholename ./dir_three \) -prune -o -name "*.php" -print -o -name "*.html" -print -o -name "*.htm" -print
Please note that if the starting point is different from the current directory ".", you have to specify the whole name of the directories to exclude accordingly, for example
Code:
find test_dir -wholename test_dir/dir_one -prune -o -name "*.php" -print -o -name "*.html" -print -o -name "*.htm" -print