rdfind icon indicating copy to clipboard operation
rdfind copied to clipboard

Add -min-file-size option

Open jeabraham opened this issue 3 years ago • 1 comments

We have found an addition of -min-file-size option to be very useful, for hard linking, since small files could be identical by coincidence, and anyway hard linking small files doesn't save a lot of disk space. See description below.

How would you like me to submit the suggested code changes?

We found hardlinking to be problematic with small files, which could be identical by coincidence. Since hardlinking files could cause problems, if one is hardlinking to save space it makes sense to focus on the larger files, to have more bang for the buck.

We added a -min-file-size option. So, for example, if you find on OSX that the combination of Apple Mail and GMail has bloated your drafts folder with many identical copies of huge attachments, you may want to hardlink the identical copies of the larger attachments together:

rdfind -makehardlinks true -min-file-size 40000 /Users/jabraham/Library/Mail/V6

jeabraham avatar Oct 13 '22 18:10 jeabraham

Oh, it looks like maybe you added this already in 9ba54fb424cbdc6c3dc78915f59bb94a35f41887 in October 2018?? I should merge in your latest, I guess.

jeabraham avatar Oct 13 '22 19:10 jeabraham