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.

Your name can also be listed here. Work as a Paid freelancer/writer at TecMint.

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

37 Responses

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

  2. Rajkumar Yadav says:

    Great articles

    Thanks !

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

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

  5. 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. 46679
  2. 2055
  3. 10101

Enter your email to get latest Linux Howto's