Some Linux file systems like XFS and BTRFS support creating copy-on-write file clones. They share all the advantages of hard links but not their disadvantages like the shared inode. See xfs-reflinks-and-deduplication.
This patch implements the same
cp --reflink=auto uses and falls back to blockwise copy.
In or project it reduces CMake install time from 56 to 24 seconds and also does not allocate any extra space for the installed data.