sahib / rmlint

Extremely fast tool to remove duplicates and other lint from your filesystem
http://rmlint.rtfd.org
GNU General Public License v3.0
1.86k stars 128 forks source link

How to isolate deletion results to a single path? #477

Closed ylluminate closed 3 years ago

ylluminate commented 3 years ago

I'm having some trouble with rmlint. Aside from not being able to get xattr to work on macOS, I'm also finding that when I even tag a folder for selection, empty folders and empty files, etc. are seemingly still selected on the path that I do not wish to touch. For example, in this case I'd like to ONLY select items in /path/to/b/ for removal (including empty files/folders) while not selecting anything in /path/to/a/ for removal, but it keeps selecting empty files/folders in /a/ as well...

I used this to build the rmlint.sh script:

rmlint --xattr -g -e /path/to/b // /path/to/a

What can I do to only select things in /path/to/b?

SeeSpotRun commented 3 years ago
-k --keep-all-tagged / -K --keep-all-untagged
    Don't delete any duplicates that are in tagged paths (-k) or that are in non-tagged paths (-K).
   (Tagged paths are those that were named after //).

So you just need to include -k in your command.

rmlint -k --xattr -g -e /path/to/b // /path/to/a
ylluminate commented 3 years ago

Great, thanks so very much. My only problem then now, given I have several TB of data to compare multiple times with some additional comparisons after this, is to figure out how to get the extended attributes storage for the checksum working...