adrianlopezroche / fdupes

FDUPES is a program for identifying or deleting duplicate files residing within specified directories.
2.42k stars 186 forks source link

Duplicate of itself? #173

Closed AgneTallroth closed 1 year ago

AgneTallroth commented 1 year ago

fdupes: Version : 1:2.2.1-2 Platform: Aritix Linux 5.15.82-1-lts

According to the following output, I might have delete one of each, leaving me with nothing left, since when I do a simple ls in this directory, there is only one of each.

103051 bytes each: 2022-04-15 16:15 /home/Pictures/WhatsApp/IMG-20200122-WA0003.jpg 2022-04-15 16:15 /home/Pictures/Whatsapp/IMG-20200122-WA0003.jpg
141902 bytes each:
2022-04-15 16:15 /home/Pictures/WhatsApp/IMG-20190917-WA0004.jpg
2022-04-15 16:15 /home/Pictures/Whatsapp/IMG-20190917-WA0004.jpg
42050 bytes each:
2022-04-15 16:15 /home/Pictures/WhatsApp/IMG-20191225-WA0006.jpg
2022-04-15 16:15 /home/Pictures/Whatsapp/IMG-20191225-WA0006.jpg
99897 bytes each:
2022-04-15 16:15 /home/Pictures/WhatsApp/IMG-20200421-WA0000.jpg
2022-04-15 16:15 /home/Pictures/Whatsapp/IMG-20200421-WA0000.jpg
53688 bytes each:
2022-04-15 16:16 /home/Pictures/WhatsApp/STK-20200505-WA0000.webp
2022-04-15 16:16 /home/Pictures/Whatsapp/STK-20200505-WA0000.webp
550041 bytes each:
2022-04-15 16:15 /home/Pictures/WhatsApp/IMG-20200229-WA0002.jpg
2022-04-15 16:15 /home/Pictures/Whatsapp/IMG-20200229-WA0002.jpg
jbruchon commented 1 year ago

This happens if you specify paths twice, either explicitly or implicitly via a parent or symlink. In the jdupes fork I wrote a double-traversal prevention routine that stops this from happening, but it uses extra memory and processing time and right now I'm having to completely rewrite the code due to poor scaling. It also causes problems with some network shares and cloud storage such as Google Drive. Your best bet for now is to figure out why the same parent directory is getting into the program twice and change your invocation so it doesn't happen. This problem is not unsolvable in code but it's also far from a simple fix. Better to prevent it from happening at invocation than relying on a safeguard to protect you from yourself. 😉

AgneTallroth commented 1 year ago

Sorry. My mistake. I now see that I have two different folders. One with uppercase and one with lowercase in the middle of the name. You may close this now.

jbruchon commented 1 year ago

Wow. I feel kind of bad that I didn't notice that. Good catch! Glad you figured it out.