The default grep searches all files, including files under Hidden folders.
The --exclude-dir= parameter of grep is to exclude a directory, which does not contain the directory after the equals sign, so we can use this parameter to remove the hidden directory of the. Repo/git.
If you enter the--exclude-dir= parameter every time, is it slow and error prone, reducing efficiency?
But don't worry, we can simplify operations and improve efficiency by adding the--exclude-dir= parameter to the configuration file ~/.BASHRC, which is the current user profile for bash.
Add the following command at the end of the ~/.BASHRC file:
export grep_options= "--EXCLUDE-DIR=\.SVN"
then save, execute the source ~/.BASHRC or. ~/.BASHRC to make the modification work.
Then, when searching, execute the following command:
GREP-NR Mediabutton *
This will load the Grep_options option by default, without searching for the. SVN directory.
Note that the Grep_options keyword can not be modified to other, otherwise the system will not be considered to be GREP an option parameter.
"Linux" grep does not find a way to hide a folder