I want to find old pictures on an old disk with a certain date,
name of disk : /dev/sdf ,
Which command should I use?

  • Please edit this question to change wich to which. Commented Nov 23, 2021 at 8:56

2 Answers 2


This is easier done if you cd to the root directory of the file system you believe the pictures are in. You would want to mount the disk to something like /images and then

cd /images

find . -ctime n -name "*.jpg"

Where n = the number for days ago that the picture image was created.

To search the entire system:

sudo find / -ctime n -name "*.jpg"

You don't need sudo to find pictures you own but if you search the entire system you'll get a lot of permission denied errors if you don't.

If you have a lot of image files, you can pipe the output to a file:

find . -ctime n -name "*.jpg" >> $HOME/mypics.txt

There are a other time options, they work backwards in 24 hour increments or in minute increments like -cmin. For more information:

man find

You can also use -newerXY and ! -newerXY:

Example: To find all files modified between June 1, 2017 and July 3, 2017:

find . -newermt 2017-06-01 ! -newermt 2017-07-03 -name "*.jpg" 
  • This is the answer I neeeded. Thanx a lot jones0610
    – Mokum
    Commented Jul 4, 2017 at 17:06
  • @Mokum You're very welcome. Glad I could help!
    – jones0610
    Commented Jul 5, 2017 at 0:23

I think I would just use find and go through all pictures. If you cannot be sure that the date of the original picture actually matches the file (like if it was copied or modified) I would just go through all pictures. On command line you can use find <path to mounted drive> -iname *.jpg And replace with your mountpoint. Alternatively, you can also do a similar search in a graphical file manager.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .