TRECENTO BLOCKCHAIN CAPITAL

Trecento e uma nova plataforma de blockchain capital que estachegando ao mercado para inovar,e facilitar a vida das pessoas que usam esse tipo de plataforma, vai ser simples, pratico e rapido, todas…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Until next time !!!

The symbolic link is a real link to the original file, while a hard link is a mirror copy of the original file.

Symbolic link
- If you delete the original file, the soft link has no value, because it points to a nonexistent file.
- You can cross the file system.
- Allows you to link between directories.
- Permissions will not be updated.
- It only has the ariginal file path, not the content.

Hard link
- If you delete the original file, the hard link may still have the original file data.
- You cannot cross the file system limits.
- Cannot link directories.
- It has the same number of inodes and permissions of the original file.
- The permissions will be updated if we change the permissions of the source file.

Let us create an empty directory called “test”.

we change to the directory “test” with “cd test”

Now inside test, create a new file called source.file with some data as shown below. (with “cat” we see the content of source.file).

Well, the source file has been created.
Now, create a symbolic link to the source file.
To do so, run: ln -s source.file softlink.file (with “cat” we see the content softlink.file).

As seen, softlink.file shows the same data as source.file.
Let’s verify the inodes and permits of both with “ls -lia”

As we see in the previous screenshot, although the softlink.file has the same content as source.file, the number of inodes (268065 vs 268064) and the file permissions (lrwxrwxrwx vs -rw-rw-r- - ) are different. Therefore, it is shown that the symbolic link does not share the same number of inodes and permissions of the original file.

Let’s delete the original file and see what happens.

As you can see above, there is no such file or directory called softlink.file after we delete the original file (that is, source.file). So, now we understand that the symbolic link is just a link that points to the original file. The soft link is like a shortcut to a file. If you delete the file, the shortcut is useless.

As you know, if you delete the flexible link, the original file will still be present.

Create a file called source.file with some contents as shown below.

Now, let us create the hard link to the source.file as shown below.

Check the contents of hardlink.file.

You see the hardlink.file displays the same data as source.file.

Let us check the inodes and permissions of softlink.file and source.file.

Now, we see that both hardlink.file and source.file have the same the inodes number (15745555) and file permissions (-rw-r–r–). Hence, it is proved that hard link file shares the same inodes number and permissions of original file.

Note: If we change the permissions on source.file, the same permission will be applied to the hardlink.file as well.

Now, remove the original file (i.e source.file) and see what happens.

As you see, even if I deleted the source file, I can view contents of the hardlink.file. Hence, it is proved that Hard link shares the same inodes number, the permissions and data of the original file.

Add a comment

Related posts:

The Wrong Whitepaper

The Wrong Token is a meme token with no real utility other than laughing at how ridiculous crypto has become and what it takes to finally build a successful project. We invite you to be a part of…

Meet Election Deniers Aiming to Control Our Elections

Arizona Rep. John Finchem has organized events for the Oath Keepers, the right-wing militia group whose leader and 10 other members are charged with seditious conspiracy in the Jan. 6 insurrection…

What Advantages Do Multiple Web Browsers Offer?

There is no reason to restrict your web browser to a single browser. While keeping your privacy, you can experiment with alternative browsers with Free download Chromnius to see what features they…