echo old > a ln a b echo new > a cat a b # prints "new" and "new"
echo old > a ln a b sed -i 'c new' a cat a b # prints "new" and "old"
echo old > a cp --reflink=always a b ls -i a b # prints different inodes echo new > a cat a b # prints "new" and "old"
Thanks for examples and especially the doc link. I don't normally use hard links, and for some reason was sure that's how they behave.
Maybe my belief indeed stemmed from observing software which overwrites opened file with a new copy.