10

Hello, i have many folders with pictures and some of them are duplicates, is there an app that can detect that?

all 21 comments
sorted by: hot top controversial new old
[-] MutatedBass@beehaw.org 4 points 1 year ago

Here's a script from GPT4:

#!/bin/bash

# Create a temporary file for storing file checksums
tempfile=$(mktemp)

# Generate MD5 checksums for all files in the current directory and its sub-directories
find . -type f -exec md5sum '{}' \; | sort > $tempfile

# Detect and delete duplicates
awk 'BEGIN {
    lasthash = "";
    lastfile = "";
}
{
    if ($1 == lasthash) {
        print "Deleting duplicate file: " $2;
        system("rm -f \""$2"\"");
    } else {
        lasthash = $1;
        lastfile = $2;
    }
}' $tempfile

# Clean up
rm -f $tempfile

This script can be run with Termux from the root of your internal storage. Usually /sdcard or /storage/emulated/0. Do not confuse this with running from root if you are rooted.

Before using a script that interacts with your files you should backup anything that is important just in case.

Furthermore, if you comment out:

system("rm -f \""$2"\"");

By adding a # in front of it like this:

# system("rm -f \""$2"\"");

You can run the script and see what files the script would delete without actually deleting them. I would recommend doing this as I have not tested this script.

[-] BeeCoffee@discuss.tchncs.de 2 points 1 year ago

Haha thats so cool, I'll try that option as well :)

[-] tc43@lemmy.sdf.org 3 points 1 year ago
[-] Disonantezko@lemmy.sdf.org 3 points 1 year ago

Also in termux:

  • fclones
  • rdfind
  • go-findimagedupes
[-] MasterBuilder@lemmy.one 2 points 1 year ago

If you'd find one I'd be interested in hearing what it is. As an alternative, you might be able to use a Linux app while connected through MTP.

[-] brie@beehaw.org 1 points 1 year ago

Termux + Termux-X11 is another possibility.

[-] BeeCoffee@discuss.tchncs.de 1 points 1 year ago

I'll check it out sound interesting because i also use Termux

[-] MasterBuilder@lemmy.one 1 points 1 year ago

True, but I was thinking of something with a GUI that helps one delete duplicates selectively.

[-] brie@beehaw.org 1 points 1 year ago

Termux-X11 makes it possible to run an X11 server for GUI apps to connect to.

[-] eco_game@discuss.tchncs.de 2 points 1 year ago

My Android 12 Samsung phone can show me all duplicate files right in the android storage settings

[-] BeeCoffee@discuss.tchncs.de 2 points 1 year ago

Mine is running LineageOS and both the stock Gallery app and Aves Libre don't have that tool

[-] eco_game@discuss.tchncs.de 2 points 1 year ago

Hm, must be a OneUI thing then

[-] Radiant_sir_radiant@beehaw.org 2 points 1 year ago

FX File Explorer has that functionality (among other cleanup tools) and is generally a great file manager. It's free with limited functionality after a trial period, or a one-off fee of about three bucks for the Plus version.

[-] MutatedBass@beehaw.org 3 points 1 year ago

It isn't open source, though.

[-] nkiruanaya@lemm.ee 2 points 1 year ago* (last edited 1 year ago)

MiX file explorer for android does this. It's free. Not sure if it's open source though, does anyone know?

It does use open source libraries.

Latest version is 6.64.3 beta.

https://forum.xda-developers.com/t/mixplorer-q-a-and-faq-user-manual.3308582/

"MiXplorer (Mix of Explorers) is a fast, smooth, beautiful, reliable and fully-featured file manager with a simple and intuitive user interface." created by XDA member and Recognized Developer @HootanParsa

[-] Swimmerman96@beehaw.org 2 points 1 year ago

I like Czkawka for detecting and handling duplicate files, similar files, empty directories, and more.

[-] BeeCoffee@discuss.tchncs.de 1 points 1 year ago

Use that for Mint and worked flawlessly, nice to be able to find it in flatpak ƪ(ړײ)‎ƪ​​

[-] Disonantezko@lemmy.sdf.org 1 points 1 year ago

I also like this in Linux, but isn't on Android or Termux.

[-] deadcatbounce@reddthat.com 1 points 1 year ago

The Google Files app will find duplicates and other things.

this post was submitted on 11 Sep 2023
10 points (100.0% liked)

Free and Open Source Software

17550 readers
14 users here now

If it's free and open source and it's also software, it can be discussed here. Subcommunity of Technology.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 2 years ago
MODERATORS