adrianlopezroche / fdupes

FDUPES is a program for identifying or deleting duplicate files residing within specified directories.
2.48k stars 186 forks source link

Feature request: ignore files copied with --reflink=auto on BTRFS #67

Open saintger opened 7 years ago

saintger commented 7 years ago

Files copied with --reflink=auto on BTRFS are already sharing the same data. However fdupes identify them as duplicates (and in a technical sense, they are indeed duplicates). It would be nice if we could have an option to ignore such files.

Thanks for this useful software.

saintger commented 7 years ago

I am not expert, but here is someone else who has the same question and got some answers: https://www.spinics.net/lists/linux-btrfs/msg19075.html I have no idea if the code would be specific to BTRFS or applicable to CoW filesystems in general.

saintger commented 7 years ago

Indeed, thanks for having looked. I just saw your jdupes fork, looks interesting ! The reason for this feature request, was to use fdupes with duperemove, in order to use BTRFS deduplication. However it seems that I can just use your jdupes for that. Is your "--dedupe" option considered stable ? I have not seen anyone else using it.

saintger commented 7 years ago

For info, rmlint has tried to implement this feature: https://github.com/sahib/rmlint/issues/132 https://github.com/sahib/rmlint/blob/develop/lib/formats/sh.c.in#L89-L96