On Linux, I created a file (file1):
echo Hello file1 > file1
Then, I created a symbolic link (file2), to file1:
ln -s file1 file2
After that, I removed file1:
Lastly, I edited file2 to be different:
echo Changed file2 > file2
After all of these steps were executed, I observed that file1 and file2 now contain "Changed file2".
From what I understand, after file1 is removed, the symbolic link (file2) no longer works. However, the interesting part which I hope to get an answer to, is that editing file2 causes file1 to be restored (despite file1 being removed earlier on).
Thank you very much for your time.