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

Change formatter after the fact #635

Closed Som-anon closed 8 months ago

Som-anon commented 8 months ago

Is there a way to change formatter after generating the rmlint.sh file? If you forgot to specify sh:reflink or something in the beginning is it still possible to invoke it later without having to rescan everything? Is it maybe even possible to create reflink copies after deleting the duplicates by mistake? In theory I could modify remove_cmd or create a script that modifies the rmlint.sh file, but I hoped that it would be easier somehow

cebtenzzre commented 8 months ago

rmlint by default will generate a .json file as well as the .sh script, which you can use with --replay mode to specify any action you would like, e.g. rmlint --replay rmlint.json <orig_path> -c sh:link (replace with the path or paths you passed to the original rmlint command). It will generate a file called rmlint.replay.sh by default.