rgrep
Recursively find patterns in files using regular expressions.
Equivalent to grep -r
.
More information: https://www.gnu.org/software/grep/manual/grep.html.
-
Recursively search for a pattern in the current working directory:
rgrep "{{search_pattern}}"
-
Recursively search for a case-insensitive pattern in the current working directory:
rgrep --ignore-case "{{search_pattern}}"
-
Recursively search for an extended regular expression pattern (supports
?
,+
,{}
,()
and|
) in the current working directory:
rgrep --extended-regexp "{{search_pattern}}"
-
Recursively search for an exact string (disables regular expressions) in the current working directory:
rgrep --fixed-strings "{{exact_string}}"
-
Recursively search for a pattern in a specified directory (or file):
rgrep "{{search_pattern}}" {{path/to/file_or_directory}}
License and Disclaimer
The content on this page is copyright © 2014—present the tldr-pages team and contributors.This page is used with permission under Creative Commons Attribution 4.0 International License.
While we do attempt to make sure content is accurate, there isn't a warranty of any kind.