K
K
kpa6uu2017-03-19 04:19:52
linux
kpa6uu, 2017-03-19 04:19:52

Is it true that a symbolic link is a link to a hard link?

Hello.
Are the following two statements true? When creating a file, is memory allocated in the file system and a hard link to the memory address is created? So by creating a symbolic link - are we creating a link to a hard link?
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stalker_RED, 2017-03-19
@kpa6uu

No and no.
Create a file "a.txt" and write hello worl there.
Create a hardlink and a symlink to this file.
Then we arrange a circus with tricks:
1. Rename "a.txt" to anything and check.
The hardlink still points to the file, and tells us "hello world" The
symlink swears.
2. Create a new "a.txt" and write "all your base are belong to us" in it.
The hardlink keeps telling us "hello world"
while the symlink says "all your base are belong to us".
Then we remember that there are a little more than one file system in the world. Ouch.
There are even pictures here askubuntu.com/questions/108771/what-is-the-differe...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question