Reading list Switch to dark mode

    How to search for files containing specific word in Linux

    Updated 26 June 2014

    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}

    Start your headless eCommerce
    Read More

    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.







    . . .
    Discuss on Helpdesk

    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