I am searching a dir for a particular string (to see all instances of where the string is present and in which files). However, I want to exclude one particular file from being searched.
Here's what is happening-
$echo "searchstring" > ./old_folder/useless_file $echo "searchstring" > ./new_folder/good_file $grep -r --exclude="old_folder/useless_file" searchstring * ./old_folder/useless_file:searchstring ./new_folder/good_file:searchstring
Here is the output I want-