Has anyone succeed to create a symbolic link that point to it self? I tried to create a symlink to some file delete the real file and try to link to it self but got this error:
ln: creating symbolic link `********': File exists
I know its possible to create this symlink.
You can create a symbolic link that points to itself with ln -s
:
$ ln -s testlink testlink
$ ll testlink
lrwxrwxrwx 1 me myGroup 4 19 avr. 11:22 testlink -> testlink
However another file with the same name must not exist beforehand :
$ touch testlink
$ln -s testlink testlink
ln: impossible de créer le lien symbolique « testlink »: File exists
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With