Menu Close
    Start a Project Request quote Reading list Switch to dark mode

    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.







    . . .


    Add Your Comment

    Be the first to comment.

    Back to Top
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just recieved your project brief and our expert will contact you shortly.
    Send Again