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
The principle is to first write a div with a butt...
1. Introduction to Apache Bench ApacheBench is a ...
[LeetCode] 197.Rising Temperature Given a Weather...
I have found a lot of online resources on this pro...
Table of contents 1 A brief introduction to syste...
It is already 2020. Hungry humans are no longer s...
http://www.cppcns.com/shujuku/mysql/283231.html Y...
Table of contents Preface Function Overloading Ma...
As shown in the figure: There are many files conne...
MySQL official website zip file download link htt...
3D coordinate concept When an element rotates, it...
Part 1 Overview of SSH Port Forwarding When you a...
Recently a friend asked me if I have ever played ...
Table of contents Write in front Business code us...
There are three ways to introduce CSS: inline sty...