top | item 43174899 (no title) BWStearns | 1 year ago I have file A that's in two places and I run this.I modify A_0. Does this modify A_1 as well or just kind of reify the new state of A_0 while leaving A_1 untouched? discuss order hn newest madeofpalk|1 year ago It's called copy-on-write because when you modify A_0, it'll make a copy of the file if you write to it but not A_1.https://en.wikipedia.org/wiki/Copy-on-write#In_computer_stor... bsimpson|1 year ago Which means if you actually edited those files, you might fill up your HD much more quickly than you expected.But if you have the same 500MB of node_modules in each of your dozen projects, this might actually durably save some space. load replies (1) BWStearns|1 year ago Thanks for the clarification. I expected it worked like that but couldn't find it spelled out after a brief perusal of the docs. kdmtctl|1 year ago What will happen when the original file will be deleted? Often this handled by block reference counters, which just would be decreased. How APFS handles this? Is there any master/copy concepts or just block references? lgdskhglsa|1 year ago He's using the "copy on write" feature of the file system. So it should leave A_1 untouched, creating a new copy for A_0's modifications. More info: https://developer.apple.com/documentation/foundation/file_sy...
madeofpalk|1 year ago It's called copy-on-write because when you modify A_0, it'll make a copy of the file if you write to it but not A_1.https://en.wikipedia.org/wiki/Copy-on-write#In_computer_stor... bsimpson|1 year ago Which means if you actually edited those files, you might fill up your HD much more quickly than you expected.But if you have the same 500MB of node_modules in each of your dozen projects, this might actually durably save some space. load replies (1) BWStearns|1 year ago Thanks for the clarification. I expected it worked like that but couldn't find it spelled out after a brief perusal of the docs. kdmtctl|1 year ago What will happen when the original file will be deleted? Often this handled by block reference counters, which just would be decreased. How APFS handles this? Is there any master/copy concepts or just block references?
bsimpson|1 year ago Which means if you actually edited those files, you might fill up your HD much more quickly than you expected.But if you have the same 500MB of node_modules in each of your dozen projects, this might actually durably save some space. load replies (1)
BWStearns|1 year ago Thanks for the clarification. I expected it worked like that but couldn't find it spelled out after a brief perusal of the docs.
kdmtctl|1 year ago What will happen when the original file will be deleted? Often this handled by block reference counters, which just would be decreased. How APFS handles this? Is there any master/copy concepts or just block references?
lgdskhglsa|1 year ago He's using the "copy on write" feature of the file system. So it should leave A_1 untouched, creating a new copy for A_0's modifications. More info: https://developer.apple.com/documentation/foundation/file_sy...
madeofpalk|1 year ago
https://en.wikipedia.org/wiki/Copy-on-write#In_computer_stor...
bsimpson|1 year ago
But if you have the same 500MB of node_modules in each of your dozen projects, this might actually durably save some space.
BWStearns|1 year ago
kdmtctl|1 year ago
lgdskhglsa|1 year ago