RMLINT -- move files instead of deleting them
I'm using RMLINT as a substitute for DUPEGURU, which is CPU- and RAM-intensive. However, RMLINT doesn't give me the option of moving duplicate files to a new folder instead of deleting them -- a feature that DUPEGURU has and which I can't find on any command-line script.
This is important, especially when I'm new to RMLINT, to avoid accidental erasures by keeping duplicates for a while before deleting. I see a feature request from 2017, though I don't know if it's been implemented. It's hard to find a command-line script that does all I need, including searching for duplicate files or folders only matches with the same name using a reference folder selecting file types to delete by extension dry runs moving duplicate hierarchy to separate folder |
Never used it (there are a plethora of CLI tools out there), but their own doco states:
Quote:
Edit: Missed the update as I was off looking for the doco. Get a tool that does most of what you want, and then manage it in the script. All the heavy lifting should be done for you. |
Quote:
I don't trust any script, app, or myself for that matter -- to handle this without error, which is why I insist on moving the files instead of deleting -- at least for a while. I believe dupeguru does byte-for-byte comparison, which could account for its inefficiency. I can't find a switch to use only the hashing algorithm. Thanks for your reply. |
Update -- rmlint -- move files rather than delete
Update. I am trying to use rmlint to remove duplicates. I dont want to delete them -- just move them to a different drive. I would like the original directory structure preserved.
My original command was executed from: Code:
/Volumes/rmlintTest/testData15may24/ Code:
rmlint -gvbex -T df /Volumes/rmlintTest/testData15may24/ Code:
/Volumes/rmlintTest/testData15may24/tmp Code:
remove_cmd() { However, the folder tmp is misconstrued as being below Volumes, like this -- in MacOS. cp: tmp/Volumes/rmlintTest/testData15may24/dir2/11-testLint.txt: No such file or directory. I've tried cp instead of mv -- by cd'ing into the target folder before cp'ing. That does move the files -- but doesn't preserve the folder structure. I've been on this for a while and am totally stumped. Assistance appreciated. |
Maybe mkdir the path first?
Code:
newfn="/tmp/${1#/}" |
All times are GMT -5. The time now is 10:11 PM. |