How to find a file containing a "keyword" in linux?
To find files which contain a specific word you can use below commands.
Login to Linux server and open a terminal (Applications >> Accessories >> Terminal).
1. 'Find' command
find -name "*pattern*"
It displayed all the files which have the word "pattern" in the filename.
find /home -name "*pattern*"
This will look for the files in the /home directory with "pattern" in the filename.
2. 'Grep' command
grep -H -r "pattern" folder_name
-H : Print the filename for each match.
-r : Read all files under each directory, recursively.
eg: grep -H -r "pattern" /home
This will look for the files in the /home directory with "pattern" in the filename.