dotfiles/.local/bin/scripts/duploc

10 lines
299 B
Bash
Executable File

#!/bin/sh
# Delete files under current or given path which exist elsewhere as listed in the locate database
# Matches first by name, then by checksum
# TODO
find "$@" -size +50M | while read filepath
do f="$(basename "$filepath" | synct-unarchive)"
highlight "$filepath"
locate -b "$f"
done