Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
dedup: dedup finds and clones duplicate files in APFS (github.com/ttkb-oss)
2 points by tambourine_man on March 28, 2024 | hide | past | favorite | 2 comments


Why would you want to clone a duplicate file? Wouldn’t you want to remove duplicates?


> replace duplicate file data with a copy-on-write clone.

Say you have a "placeholder" graphic for <movie poster> in a very large media library tree.

All the identical <no poster yet> graphics in all the seperate movie directories can point to the same set of image bits.

When a poster is found and image data written to the pre existing clone, a new file is created ( copy on write ) and the file-data-pointer redirected to the new poster and away from the heaviliy shared placeholder poster.

There's a caveat:

    While dedup is primarily intended to be used to save storage by using clones, but provides -l and -s flags to replace duplicates with hard links or symbolic links respectively. Care should be taken when using these options, however.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: