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
This article shares the specific code of node+soc...
CentOS6.9 installs Mysql5.7 for your reference, t...
This is a collection of commonly used but easily ...
Nginx supports three ways to configure virtual ho...
Related articles: Beginners learn some HTML tags ...
Table of contents 10,000 pieces of data were lost...
Preface In daily development, when we use MySQL t...
1. Go to the official website: D:\mysql-5.7.21-wi...
Table of contents 1. this keyword 2. Custom attri...
I have several tomcats here. If I use them at the...
Introduction to border properties border property...
The command pattern is a behavioral design patter...
Table of contents origin Environmental Informatio...
I finished reading "Patterns for Sign Up &...
Preface HTTP is a stateless communication protoco...