Linux grep and ripgrep Cheat Sheet/Match literal text only

Disable regex interpretation.

Section: Regex with grep

Match literal text only

bash
bash
grep -F 'a+b*c' notes.txt
Explanation

Equivalent to traditional `fgrep` and useful when searching for symbols literally.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Regex with grep
Use extended regex
Enable `+`, `?`, and alternation without heavy escaping.
OpenIn sheetbashsame section
Match line start and end
Search with anchors.
OpenIn sheetbashsame section
Find blank lines
Search for empty lines.
OpenIn sheetbashsame section
Find non-blank lines
Show lines containing at least one non-space character.
OpenIn sheetbashsame section
Search for a word
Print lines containing a pattern.
OpenIn sheetbash1 tag match
Search recursively
Search all files under a directory.
OpenIn sheetbash1 tag match