In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
In this issue, the editor will bring you two kinds of connections about linux. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
There are two kinds of Linux connections, one is called hard connection (Hard Link), the other is called symbolic connection (Symbolic Link), that is, soft connection.
By default, the ln command produces hard links and the ln-s command produces soft links.
[hard connection] hard connection refers to the connection through an index node. In Linux's file system, files saved in disk partitions, regardless of type, are assigned a number called index node number (Inode Index).
In Linux, it is possible to have multiple file names pointing to the same Inode. Generally speaking, this kind of connection is a hard connection. The purpose of a hard connection is to allow a file to have multiple valid pathnames, so that users can establish a hard connection to important files to prevent "accidental deletion".
The reason is as mentioned above, because there is more than one connection to the index node of the directory. Deleting only one connection does not affect the Inode itself and other connections. Only when the last connection is deleted will the connection of the file's data block and directory be released. In other words, the condition for a file to be really deleted is that all hard-connected files associated with it are deleted.
There are 2 restrictions on hard connections:
Hard links to directories are not allowed
Links can only be created between files in the same file system. That is, one of the two files on different hard disk partitions
Hard links cannot be established. This is because the hard link points to the original file through the node, and the node of the file may be different in different file systems.
[soft links] soft links, also known as symbolic links, are actually a special file, somewhat similar to Windows shortcuts. This file contains the pathname of another file. It can be any file or directory, and you can link files from different file systems.
Linked files can even link files that do not exist, which gives rise to what is commonly known as "chain breakage" (or "phenomenon", link).
The file can even loop through itself. Similar to recursion in programming languages.
These are the two connection modes of linux shared by the editor. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.