GNU/Linux Fedora Grep Search for Strings in Files Guide
Hi! This tutorial will guide you step-by-step on How to use Grep tor Search for Strings in Files in Fedora GNU/Linux Command Line.
And to Search for Strings in Files with Grep in Fedora you have simply to use the -F Flag (Meaning: fixed Strings).
Searching for Strings in Files with Grep
So now to Search for Strings on Fedora
Use the -F Flag and enclose the String in Single or Double Quotes
So generally you can search a Single File like:grep -F "[MYSTRING]" [MYFILE]
And for instance:grep -F '</a>\r </div>\r </div>\r </div>\r <p>First Update the Apt' updatel.txt
When to Search all the Files in a Directory add the -r Flag (Recursively) as:grep -Fr "[MYSTRING]" [MYDIR]
And so again for instance:grep -Fr '</a>\r </div>\r </div>\r </div>\r <p>First Update the Apt' .
Last, for more insight see the Grep Help with:grep --help