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.85k stars 128 forks source link

Original Detection: Rank by depth when piping files from find #660

Open Philipp-Binder opened 2 months ago

Philipp-Binder commented 2 months ago

Is there a way for Original Detection to rank by depth (-S D) when piping files from find?

When piping files with find . -type f every listed file in json-output has depth 0. Ranking by depth has no effect then.

I have a filesystem where I need to exclude specific auto-generated subfolders. So I need to use find . -type f ! -path '*/excluded/*', at least I see no other way to achieve that. Additionally I do know about my file-structure, that deeper paths are the originals. But since rmlint sets depth=0 to all files, I cannot use that for Original Detection.

Is there another way to achieve this? Or maybe there should be a feature-request to adjust how depth is determined, either by traversal-depth or by absolute path-depth?