35 Practical Examples of Linux Find Command

Download Your Free eBooks NOW - 10 Free Linux eBooks for Administrators

Ravi Saive

Simple Word 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.

Host Your Own Website at $97 Discount + One Free Domain Using our Promo Code 'Tec97' (Enter this code during Signup) - Signup with DreamHost Now!

Download Free Linux eBooks

Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Ubuntu Linux Toolbox: 1000+ Commands

You may also like...

42 Responses

  1. Very Very Good information Find Commands.

  2. Sandip Kasar says:

    I am very glad that you have describe the find command with examples. Thanks once again and Keep posted the linux related stuffs.

  3. md shamim says:

    I have to move directory from which contain logs. Each dir created like 26022015 and i want to move dir except 3 days recent one.

  4. Iv says:

    Great article.
    How to find executables files on RHEL4 and Solaris 9 and 10?
    I tried with
    find / -executable -type f and
    find / -perm /u=x,g=x,o=x -type f
    but it worked only on RHEL6.


  5. Anup says:

    Good information
    All at one place


  6. Sunny says:

    HI , How to see the files in particular date, Suppose I want to see Jan 18 2015 files among all the files. I tried +mtime not working

    find . -newermt 2015-01-18 -ls lrt

    above one is not working for me, Please suggest something

  7. Rajkumar Yadav says:

    Great articles

    Thanks !

  8. Farid Afshar says:

    Hello sir,

    I am trying to find files in Linux using the find command. I need to search in an nfs mounted filesystem to list all the files owned by a certain user. Example:

    drwxrwxr-x 2 afsharf staff 126976 Oct 9 14:20 trevor/
    -rw-rw-r– 1 afsharf staff 22947599 Oct 9 08:52 troj.out
    -rwxr-xr-x 1 camachoe staff 11752 Jun 25 2013 runtnav_beta_h*
    -rwxr-xr-x 1 camachoe staff 11648 Jun 25 2013 runtnav_h*

    I would like to find files owned by “camachoe” in the current and sub- directories . Any idea how to do that using find command? this is an nfs mounted filesystem.
    Thank you in advance.

  9. Jec says:

    Hi Sir,

    Is there a way to use find/locate on a list? example:

    while read line
    if locate “$line”
    echo “Y: $line”
    echo “N: $line”

    done < $1

    on my case, this always returns N: (line), I think the locate command reads my variable as $line literally, also tried to use find command here, same result. any thoughts?? thank you in advance :)

  10. Bharath says:

    I want to delete the files and print to output file with date,Time and Size.

    • Ravi Saive says:

      Bharath, I think you should try this command.

      # find /your-path -maxdepth 1 -type f -name "*.txt" > filestobedeleted.txt

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Join Over 62000+ Linux Users
  1. 48100
  2. 2222
  3. 11697
Enter your email to get latest Linux Howto's