Reference number: CH000757
How do I find text within files in Linux?
Question:
How do I find text within files in Linux?
Additional information:
This document is for users looking for information about finding
text within one or more files on their computer. If you're looking
for information about finding a file on your computer, see document
CH000623.
Answer:One of the easiest methods of locating text contained within a
file on a computer running Linux is to use the grep command. Below
is a basic example of a command used to locate any htm file
containing the word "help".
grep "help" *.htm
See our grep command page for
additional information and help with this command.
|