Webkul
Services
Technologies Bagisto QloApps
iOS Android SAP BigCommerce Wix
Trusted by
Samsung Intel Toyota Walmart Disney Nokia Nestlé Decathlon
See all customers
Back to Top
DOC

How to search for files containing specific word in Linux

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.

 

 

 

 

 

 

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home