Discover when two files on a CoW filesystem share identical physical data.
See Also:
fienode, for finding identical matches via a hash.filefrag -v, for listing physical extents.
go get github.com/pwaller/sharedextents
See releases.
For example:
$ sharedextents a b
1142734848 / 1679605760 bytes (68.04%)
# (note: files a and b share some physical extents)
Exit is status 0 if extents are shared between a and b, and 1 otherwise.
There may be bugs. This will delete all your data and eat your cat. When it does, that is your problem. Keep backups, folks.
MIT.