In the Linux system, there is a kind of file called link file, which can be used to solve file sharing. There are two types of links: hard link and soft link or symbolic link. Hard link concept A hard link (also called a link) is one or more file names of a file. A hard link is a link made through an index node. In the Linux file system, no matter what type of file is stored in the disk partition, it will be assigned a number, which is called the inode number. Index) or Inode, which is the unique identifier of a file or directory in a file system. The actual data of the file is placed in the data area (data block), which stores important file parameter information, that is, metadata, such as creation time, modification time, file size, owner, user group, read and write permissions, data block number, etc. After the hard link is established, the source file and the link file are synchronized, and any modification to either file will be modified Establishing links can save space. You only need to maintain the link relationship without copying the file. Soft link concept A soft link (also called a symbolic link) is similar to a shortcut in the Windows system. Unlike a hard link, a soft link is just an ordinary file, but the data block content is a bit special. The content stored in the file user data block points to the path name of another file. This method can quickly locate the source file entity pointed to by the soft link. Soft links can be created for files or directories. Soft link function:
The essential difference between hard links and soft links A hard link can be considered as a file with two file names; a soft link is a new link file created by the system, which points to the file it refers to. Limitations of Hard Links
Create a soft link Deleting soft links Note: For directory soft leveling rm ln_dir is to delete the soft link rm ln_dir/ deletes the files in the directory ln_dir. Of course, the files in the source directory will also be deleted (synchronously). The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed explanation of how to create multiple instances of MySQL 5.6 in centos7 environment
>>: JavaScript to implement limited time flash sale function
mistake The following error occurs when connectin...
Building new images from existing images is done ...
webkit scrollbar style reset 1. The scrollbar con...
The operating environment of this tutorial: Windo...
I was in a meeting when a colleague called to rep...
I installed a new version of MySQL (8.0.21) today...
Find the problem Today, when I tried to modify th...
If you want to exit bash, there are two options: ...
During development, a good user interface will al...
Table of contents Immediately execute function fo...
What Beautiful HTML Code Looks Like How to write ...
There are two ways to run .sh files in Linux syst...
Table of contents Introduction How to connect to ...
Let me look at the example code first: 1. Common ...
Every time I design a web page or a form, I am tr...