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.

TecMint users Get a Free Domain and 30% off on Inmotion Web Hosting - Signup with Inmotion 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...

40 Responses

  1. 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.

  2. Iv says:

    Hi.
    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.

    Thanks!

  3. Anup says:

    Good information
    All at one place

    thanks

  4. 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

  5. Rajkumar Yadav says:

    Great articles

    Thanks !

  6. 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.

  7. Jec says:

    Hi Sir,

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

    while read line
    do
    if locate “$line”
    then
    echo “Y: $line”
    else
    echo “N: $line”
    fi

    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 :)

  8. 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. 47558
  2. 2150
  3. 11343

Enter your email to get latest Linux Howto's