Welcome to WebmasterWorld Guest from 18.104.22.168
Forum Moderators: bakedjake
ln -s is used to create symbolic links. Just plain ln creates "hard links". Some people refer to symbolic links as "soft links".
A hard link is simply an additional directory entry pointing to the same data. They're a bit of a pain from a bookkeeping perspective, as it's impossible to easily determine where they point. You can only tell how MANY of them there are pointing to the same data. But they're a bit faster than symbolic links. And when you delete a file via a hard link, the file and all the links go away. Not so with a symbolic link.
The -S option, as pointed-out above, has nothing to do with hard or soft links. It deals with adding a suffix to backup files.
when you delete a file via a hard link, the file and all the links go away. Not so with a symbolic link.
But with symbolic links, if you delete the file itself, the link becomes useless.
Also, hard links work only between files on the same filesystem, and not directories. Symbolic links will work across filesystems, and directories too.
Not quite. If you hard-link file A to file B, you can delete either one and the other will still be there intact
Sorry... correct. The file will disappear when you have removed all of the hard links (including the original).
There's no difference between a normal directory entry and a hard link. A hard link is simply a duplicate directory entry.
BTW, Windows supports symbolic links, though it's an obscure, poorly-documented feature that has some quirks.