Search and Filtering

fgrep

Searches fixed strings instead of regular expressions.

fgrep is traditionally equivalent to grep -F, treating the pattern as literal text.

Syntax
fgrep pattern [file...]

Arguments explained

  • Options adjust output or behavior.
  • Arguments name the files, services, hosts, or values the command should work with.

Common examples

Search literal brackets
fgrep '[ERROR]' app.log

Searches for literal square brackets without regex escaping.

Preferred modern form
grep -F '[ERROR]' app.log

Uses grep's fixed-string option explicitly.

fgrep Command
FieldDetails
Commandfgrep
CategorySearch and Filtering
Primary useSearches fixed strings instead of regular expressions.
Syntaxfgrep pattern [file...]