However, notice that cat doesn't protect you in the same way:
Peters-iMac:tst pd$ echo stuff > A
Peters-iMac:tst pd$ ln -s A B
Peters-iMac:tst pd$ ls -l
total 8
-rw-r--r-- 1 pd staff 6 Sep 13 15:20 A
lrwxr-xr-x 1 pd staff 1 Sep 13 15:20 B -> A
Peters-iMac:tst pd$ cp A B
cp: B and A are ident
If file.copy() is used to replace a symlinked file, it erases the
original file and does not copy the file. The original file is lost.
> version
_
platform x86_64-apple-darwin15.6.0
arch x86_64
os darwin15.6.0
s
2 matches
Mail list logo