File duplication takes no disk space!
I have a question that's probably not asked too often, because it has little negative impact on the user. I can't find it on The Google anyway.
So this question is for the edification of the curious-minded.
In my production environment I manually backup often. I have noticed that when simply duplicating files, they don't take up as much space as they used to in older versions of MacOSX.
As an experiment (because I am a nerd) I attempted to fill my hard drive by copying large files. Duplicating files barely changed the "capacity" / "available" numbers at all.
The duplicates are there.
Can someone explain this aspect of the OSX filing system to me? It's absolutely amazing!
Details:
- not using Cloud
- MacBook Air ca. 2017
- MacOSX 10.14.6
Solution 1:
Apple File System (APFS) and Clones
Copying a file creates a clone of that file. Clones take very little space. Only when a clone is modified, is significant additional space required.
Clones
Clones allow the operating system to make efficient file copies on the same volume without occupying additional storage space. Changes to a cloned file are saved as delta extents, reducing storage space required for document revisions and copies.[9] There is, however, no interface to mark two copies of the same file as clones of the other, or for other types of data deduplication.
See also iMore's Apple File System (APFS): What you need to know.
To understand how APFS works, see the Apple File System Reference.