top | item 43173644

(no title)

NoToP | 1 year ago

The fact that copying doesn't copy seems dangerous. Like what if I wanted to copy for the purpose of modifying the file while retaining the original. A trivial example of this might be I have a meme template and I want to write text in it while still keeping a blank copy of the template.

There's a place for alias file pointers, but lying to the user and pretending like an alias is a copy is bound to lead to unintended and confusing results

discuss

order

IsTom|1 year ago

Copy-on-write means that it performs copy only when you make the first change (and only copies part that changes, rest is used from the original file), until then copying is free.

mlhpdx|1 year ago

Is it file level or block level copy? The latter, I hope.

Update: whoops, missed it in your comment. Block (changed bytes) level.

herrkanin|1 year ago

It’s not a symbolic link - it copies on modification. No need to worry!

pca006132|1 year ago

CoW is not aliasing. It will perform the actual copying when you modify the file content.

hutattedonmyarm|1 year ago

It‘s Copy On Write. When you modify either one it does get turned into an actual copy