[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] Looking for duplicate photos



Trey Sizemore wrote:

> Duplicate images with duplicate file names.

This is not tested, it's up to you to verify it works before you destroy 
your files.  Thrown together on the fly.... :)

# redundant loops, but it will work, I think....
# assumes you want to check every file in the current directly and
# below, regardless of type, either way
# it will remove all duplicates

for fn in $(find . -type f -print); do

	for fn1 in $(find . -type f -print); do

		if [ $fn == $fn1 ]; then continue; fi

		cmp -s $fn $fn1 && rm $fn1
	done
done

-- 
Until later, Geoffrey