1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 19:02:09 +02:00
tldr/pages/common/rgrep.md
dz-at-tc c4221c98dd
bzegrep, bzfgrep, rgrep, zegrep, zgrep: move from linux to common (#8709)
grep alternatives work substantially the same on all major platforms.
2022-10-04 09:39:55 +05:30

875 B

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}}