
What is a hard and a symbolic link
Let’s take a look at what is a hard link.
A hard link points or reference to a specific space on the hard drive that means that if you change the data in one of the hard link or the file the other will reflect that change , also if you delete the hard link that will not delete the original file.
If you want to create a hard link you should just type in your terminal:
ln source_file link
Replace “source_file” with the name of the file for which you want to create the hard link and “link” with the name of the hard link.
Now let’s look at what is a symbolic link. A soft link (symbolic link) is like a shortcut in windows, we can say that it’s an indirect pointer to a file or directory, it also can point in a different filesystem or partition.
If you want to create a symbolic link you only need to type
ln -s source_file link
The -s option indicates that is a symbolic link. The “source_file” is the name of the file and the “link” is the name of the symbolic link.
That’s all. have a good coding.