You can’t ignore initial search in all directories, but you can remove the files from specified directory after the first step.
find . -type f -exec grep -l "port" {} \;| grep -v <dir_name_to exclude>
You can’t ignore initial search in all directories, but you can remove the files from specified directory after the first step.
find . -type f -exec grep -l "port" {} \;| grep -v <dir_name_to exclude>