35 Practical Examples of Linux Find Command

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Use our Linode referral link if you plan to buy VPS (it starts at only $10/month).
  4. Support us via PayPal donate - Make a Donation
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

Receive Your Free Complimentary eBook NOW! -

Download Free Linux eBooks

Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Introduction to Linux - A Hands on Guide

You may also like...

93 Responses

  1. Behrooz Hussaini says:

    thanks for the article, but there are a lot of other options, please explain them too.
    one the important is ‘-maxdepth’ and ‘mindepth’

    • Ravi Saive says:

      @Behrooz,

      Thanks for finding it useful, but trust me its not possible to explain each option in the one single article, to know more about each option just do man find to know about it.

  2. Pali says:

    thanks for good overview :)

  3. sindhu says:

    how to search a file in the server and grep for a particular entry in that file and print only the output..?
    is there any way where we can hide all the search that is happening and display only the required result

    • Ravi Saive says:

      @Sindhu,

      You can use egrep to achieve the same, the below command will find a entry or string in a given file in Linux.

      # egrep -w 'entry or string' /path-to-file
      
  4. Datta says:

    How do I find file1.txt and somefile.json in single find command

    • Ravi Saive says:

      @Datta,

      Here is the command to multiple files using find command..

      # find . -type f \( -name "*.txt" -o -name "*.json" \)
      
  5. Q no 12 : I think there should be
    g=s

    instead of g+s

    • Ravi Saive says:

      @Suryakant,

      Yeah, that’s really good finding, yes that should be g=s, corrected in the writeup..

  6. rtt says:

    Very useful and handy little guide. -mtime is really invaluable for so many reasons.

  7. S Govardhan Raju says:

    Sir,

    We need help for linux (RHEL4) command FIND. How to tar todays ie., only current day (17-04-2016) files . Please give me examples.

    Thanking U sir,

    S Govardhan Raju
    T I R U P A T I

    • Ravi Saive says:

      @Govardhan,

      What you mean by “only current day” files? the whole system modification files in a particular day or any specific directory files you want to tar? Could you explain me more about your requirements so that I can help you out..

  8. S Govardhan Raju says:

    Sir

    We are happy to inform you that we are understanding linux commands with your examples easlly.

    Thank U very much Sir,

    S Govardhna Raju
    TIRUPATI

Got something to say? Join the discussion.

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

Join Over 150K+ Linux Users
  1. 100,756
  2. 5,113
  3. 36,418

Enter your email to get latest Linux Howto's