[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Looking for duplicate photos
- Subject: [ale] Looking for duplicate photos
- From: esoteric at 3times25.net (Geoffrey)
- Date: Sun Feb 6 20:25:08 2005
- In-reply-to: <1107712327.995.6.camel@localhost>
- References: <1107706782.995.4.camel@localhost> <[email protected]> <1107712327.995.6.camel@localhost>
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