With the command line we can search for files containing specific word in Linux. There are several methods for searching some of them are described in this post.
1. Using Grep
grep -r “word/string to be searched” where to search
2. using Locate
locate {part_of_word}
but first update your locate database
#sudo updatedb
3. using find command
find . -name ‘*{part_of_word}*’ -print
Where “.” is directory where to search
you can use “*” as a wild-card
we can also use hybrid commands i.e mixture of above three to search more specific inside the string.
Be the first to comment.