Some useful programs are missing, like rmlint.
https://rmlint.readthedocs.io/en/latest/tutorial.html
Currently getting into that (using rmlint_2.9.0-2.3_amd64.xzm that I made myself via
Code: Select all
wget http://ftp.de.debian.org/debian/pool/main/r/rmlint/rmlint_2.9.0-2.3_amd64.deb
and deb2xzm
) It creates a sh script that you might want to tweak, like, in my case, I do not want it to delete broken symlinks. ( My current system has GLIBC_2.33 and the also available rmlint-2.10.1-6.fc35.x86_64 needs at least GLIBC_2.34 )
Like, I ran it on my main images collections, and it gave me approx 2 GB more space by creating symlinks.
Code: Select all
rmlint -o sh:rmlint.sh -c sh:symlink -bl -g
-bl # -bl -badlinks (ignore bad symlinks)
-g # Show a progressbar with sane defaults
But the issue, even when you call it like above, the resulting script would still delete all broken symlinks. Maybe I am just too stupid to understand how rmlint should be executed.
I needed to change the entries in e.g. the function handle_bad_symlink() {
from
to
so that it does no longer remove my broken symlinks.
The reason I want to keep is, at times I make out of a large image file, like a wallpaper PNG (these can be 10 MB or even 25 MB or larger) smaller files by using webp instead of png, probably also reducing the resolution.
But when I already symlinked the original png, then that symlink will be broken when I deleted piratewreck.png after I created piratewreck.webp …
The reason I do not want the broken symlinks to be removed is, if I do so, then I would no longer have a reminder that certain symlinks did exist.
You can easily find broken symlinks via
Code: Select all
find -L PATH -type l -print0|xargs -0 -i ls -o --time-style=long-iso --color {} |cut -c 40-
Then I can create a new symlink to piratewreck.webp and delete the original (broken) piratewreck.png symlink.
