what is the difference between the two? What is the difference between hard link and symbolic link? the QNX doc mentions that “The link command can be very dangerous to your filesystem; you should probably use ln instead”, why is this?
So if I do: link /dev/shmem /tmp
vs
doing this: ln -sP /dev/shmem /tmp
A soft link is like a direction while shopping: You can find watches right over the street…
A hard link is more like i would be reselling the watches from over the street in my own shop.
The symbolic link does not really require the source to be valid or to stay valid, it can also be a directory (Following a dead link does not work anyway). The symbolic link is more like a sign where to find the real source.
A hard link has to have a valid source and can only be a file. As soon as your source is invalid there is no hard link anymore. hard links can also not be set to cross partition borders or device borders.
More common:
A soft link is a storage for the path to the source.
A hard link is another filename for the same data.