Linux operation (5)-create hard and soft links

Soft link

The soft link is analogous to the shortcut operation under windows. If a file can be found in many directories, we can drag it to the desktop to open it easily, which is convenient for our operation. This is also the case in the Linux operating system. The command is ln -s The a of
Insert picture description here
this command is the file a, sa is the soft link to be created, at this time sa (a soft link) will appear on the ubuntu desktop
Insert picture description here

Hard link

This command is similar to copy, two copies of data share one file data
command is ln
Insert picture description here

Compared

When the source file is deleted, the file created by the hard link can still be opened, but the file created by the soft link cannot be opened

Guess you like

Origin blog.csdn.net/weixin_48445640/article/details/108835603