May I ask you some questions about hard links and symbolic links!
Source: Internet
Author: User
May I ask you some questions about hard links and symbolic links! -- Linux general technology-Linux programming and kernel information. The following is a detailed description. 1. why cannot I link a directory with a hard link.
For example, the/tmp/test/directory should be created under the/home directory according to the hard link reasoning in the document.
The hard link of IS/home/test_hlink, that is, add a record in the block of the/home directory.
The inode number corresponding to the/home/test_hlink/directory, that is, the inode of the/tmp/test/directory.
So we can use the block in the/home directory to connect to the/home/test_hlink/directory.
The inode number of the directory/tmp/test /.
To the/tmp/test/directory.
2. Why can't a symbolic link be a cross-file system and a hard link be a problem.
In my understanding, both hard links and symbolic links locate the corresponding file or directory based on inode,
As long as the inode of different file systems can be identified, the link can be established.
You can also use hard links across file systems.
The above is my personal understanding. please point out something wrong. thank you!
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service