Jump to content

Which files are not duplicated

Hi,

There is several hundred images. I have categorized some of them into directories.

However, due to recent back ups, i have a directory wich containes every photo that our familiy has ever made.

I need to find out which images has NOT been categorised yet. How can i achieve this?

Link to comment
Share on other sites

Link to post
Share on other sites

You can write a script that will take the file name and search a directory for  matching data

 

if you're on UNIX as your title suggests, theres about a million ways to do it

Community Standards || Tech News Posting Guidelines

---======================================================================---

CPU: R5 3600 || GPU: RTX 3070|| Memory: 32GB @ 3200 || Cooler: Scythe Big Shuriken || PSU: 650W EVGA GM || Case: NR200P

Link to comment
Share on other sites

Link to post
Share on other sites

Use a tool or something to generate a md5 or sha256 hash for each file that's categorized.

Repeat for your other folder.

 

make a list with the hashes and paths to file, one for each folder.

 

Compare lists and remove duplicates.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

You could use a CLI program like fdupes to scan the directory they are in. Like mariushm suggested, this program does do a hash comparison. Quick warning, the -d flag will delete the duplicates. So don't use it unless you really really want to. I have omitted it in the examples. Check out the links for more on fdupes.

 

Install:

sudo apt-get install fdupes

Example Command:

fdupes --recursive --sameline /path/to/photos

You can also direct the output to a file with:

fdupes --recursive --sameline /path/to/photos > /home/$USER/fdupes_out.txt

 

fdupes tutorial: https://www.tecmint.com/fdupes-find-and-delete-duplicate-files-in-linux/

fdupes documentation: https://linux.die.net/man/1/fdupes

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×