Linux soft connect with hard links

Source: Internet
Author: User

  Soft links

Soft links in Linux are like shortcuts in Windows systems

Create soft link format: ln-s source file full path soft connect full path

Operation Demo:

    

Hard Links

Hard link and soft connection, it is equivalent to the image of the source file, the source file changes, the hard link file will also change, similarly, the hard link file changes, the source file will also change

Create hard-Link format: ln source file full path soft link full path

The-s parameter is less than creating a soft-link format

Operation Demo:

     

Difference:

Soft links are clearly different from hard links created.

1, Soft link is a link file, so the file size is very small

2. Hard links are the same size as source files

3. Hard links cannot span partitions

4, hard links can not be used in the directory

What is the reason why a hard-link file synchronizes with its source files?

View the hard link file with the I node of the source file and find their I node the same. The Linux operations file is through the I node, an I node mapped to two files, modify one of the files, and of course, the other has been modified.

    

Linux soft connect with hard links

Related Article

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.