Introduction to soft links, hard links, and linux links in linux

Source: Internet
Author: User

Introduction to soft links, hard links, and linux links in linux

In linux, the file stored in the disk partition is assigned a number no matter what type it is, called the index node number inode.

Create a hard link directly using ln, and create a soft link using ln-s.

Soft link: Creates a directed file for the source file, which is similar to the shortcut of windows. The inode Number of the link is different from the inode number of the original file, which can be viewed through ls-I. Because soft links direct to the original file, when the original file is deleted, soft links do not actually work. However, soft links can be used across platforms.

Hard link: a hard link is actually an alias of the original file. It has the same inode number as the original file. When one of them is modified, the other is also changed. Hard links cannot be used across file systems.

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.