It’s now easy to explore an APFS volume or folder looking for sparse files and potential clones, using my utility Sparsity. However, that’s a clumsy way to check if any given file is sparse or cloned. For that you can now turn to a new version of my free utility Precize.
When Precize is run in Big Sur (these features aren’t available in earlier versions of macOS), there are now two checkboxes labelled Sparse and Clone?
If the file being examined by Precize is a sparse file, the Sparse checkbox will be ticked. You may then notice a marked disparity between the size of the file shown under the Data heading, and that given in Disk. In this case, a 5 MB file only occupies 8 KB of storage space.
Clone files are a bit more complicated. When any file in an APFS volume is copied or duplicated, both the original and its copy are marked as potentially sharing data between them. At first, the whole data is common to both, but as they become changed the amount of common data falls, until eventually the two files may not share any data at all.
When the Clone? box is ticked, this indicates that file has, at some time in the past, either been cloned or created by cloning another file. It therefore doesn’t tell you whether there is still common data, merely that the cloning happened.
Clones are quite different from hard links, and unless a clone is also hard-linked, its Ref count should remain 1.