Now since you understand what a file inode is, you can easily understand the concept of hard and soft links. And let us start with soft links:
WHAT IS A SOFT LINK?
A soft link (also referred to as a symbolic link) is simply a file that points to another file.
A soft link (also referred to as a symbolic link) is simply a file that points to another file.
A picture is worth a thousand words, so the following diagram will help you visualize soft links.
Figure 1: A soft link visualization
To create a soft link, we use the ln command with the -s option as follows:
ln -s original_file soft_link
So to create a soft link named soft.txt to the facts.txt file, you can run the command ln -s facts.txt soft.txt:
elliot@ubuntu-linux:~$ ln -s facts.txt soft.txt
Now let's do a long listing on the soft link file soft.txt that we just created:
elliot@ubuntu-linux:~$ ls -l soft.txt
lrwxrwxrwx 1 tom tom 9 May 8 21:48 soft.txt -> facts.txt
You will notice two things. First, the letter l in the first column of the output lrwxrwxrwx, which signals that the file is a link...