1, the command ln does not add parameter s when the hard link created, plus the parameter s created by the soft connection2, soft connection is equivalent to a shortcut,3, for the file: delete the source file after the soft connection file is lost
1. Linux link conceptLinux links are classified into two types: hard link and symbolic link ). By default, the ln command generates a hard link.
[Hard connection]Hard connection refers to the connection through the index node. In a Linux File System,
Grammar:ln "Options" original file Destination fileOptions:-S Create soft connection (when creating a soft link, if the folder is inconsistent, the original file will use absolute path)Hard-Link Features:1, have the same I node and storage block
Single-User mode:
Free button output within three seconds of startup
Middle Row Key E
Edit the last line plus 1 or single or size s
B
Then execute the command runlevel
? reboot
Rescue mode:
Click to read the original1.Linux Link ConceptThere are two types of Linux links, one called hard links, and the other called Symbolic links (symbolic link). By default, the LN command produces a hard link."Hard Connect"A hard connection is a
Use of soft links(1) Soft links can be cross-partitioned, you can also create soft links to the directory(2) When a partition is not sufficient, you can create a soft link under the partition that is linked to a large partition, whichTo avoid full
Different partitions of the following two servers are displayed with different "inode size", one is 128 bytes, and the other is 256 bytes.
CH-HOV-FTP is using ext3 partition format, while WWW server is using ext4 partition format
Bytes --------------
Soft link and hard link details
Today, we will introduce the following soft links and hard links.
I. What is inode?
To understand inode, start with file storage.
1. The file is stored on the hard disk. The minimum storage unit of the hard disk is 51
The hard link records the inode of the target, and the soft link records the path of the target. Soft links are like shortcuts, while soft links are like backups. Soft links can be used as cross-partition links, while hard links can only be used as
Hard-Link File features:1, has the same I node and storage block block, can be regarded as the same file;2, can be identified by the I node3. Cannot cross partition4. Hard links cannot be linked to the directory5, modify any file another change6,
To understand the soft and hard links, we need to start with the storage principle of the Ext file system.The smallest storage unit on the hard disk is sector, which is 512bytes in size.Because data tends to be larger than 512bytes, we connect
What is a . inode ? (index node) Understanding inode need to know the file storage, the file is stored on the hard disk , when the operating system reads the hard disk, it reads multiple sectors (the smallest storage unit of the
1.Linux hard links and soft connectionsln command, create a connection command parameters: Necessary parameters:-B Delete, overwrite previously established link-D allows super users to make hard links to directories-F Force Execution-I
Command 1: View file contents
"Cat filename" to view the contents of the file, the page stays at the end.
"More file name" Paging View file contents
Enter the next line
Space page
Q exit
"Head filename" to view the first few lines of the
Command 1: View file contents
"Cat filename" to view the contents of the file, the page stays at the end.
"More file name" Paging View file contents
Enter the next line
Space page
Q exit
"Head filename" to view the first few lines of the
Link: Access different paths to the same fileHard Links: points to different paths to the same inode. Characteristics:1. Hard links cannot span partitions.2. You cannot create a hard link to a directory.3. After creating a new link, ll view the
Today I will talk about the differences between hard links (physical links) and symbolic links (similar to Windows shortcuts?
First, we should know:
Each archive occupies one inode. The archive content is directed by the inode record;
To read this
Disclaimer: This article is reposted from http://keren.blog.51cto.com/720558/170979;. There are two types of links in the Unix directory-hard links and symbolic links. A hard link itself is a directory item (such as a file name + index node number).
Before understanding soft links and hard links, you must first understand some basic concepts.File: file name + DataIn Linux, files are divided into two parts: user data and metadata.User Data: file data block, which is the place where the recorded
Body:Understanding the premise: the file on Linux can be understood as follows: File-"file name, a file can have multiple file names."In this way, a hard link can be seen as multiple file names, and a soft link can be viewed as a link to one of the
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.