One Linux Command 10 and one Linux Command 10 every day

Source: Internet
Author: User

One Linux Command 10 and one Linux Command 10 every day

File Processing Command: ln
Command name: ln command name: link
Syntax: ln-s [original file] [target file]
-S: Create a soft connection
Function Description: generate a link file.

# Ln-s/etc/issue/tmp/issue. soft
Create a soft link for the file/etc/issue/tmp/issue. soft
# Ln/etc/issue/tmp/issue. hard
Create/etc/issue hard link/tmp/issue. hard

[Root @ localhost tmp] # ls-I/etc/issue. hard issue. soft
668057/etc/issue 668057 issue. hard 407192 issue. soft
As you can see, the hard link has the same node number as the original file, and the soft link is equivalent to the shortcut of the windows system! The hard link is synchronized with the original file!

Hard links cannot span partitions and cannot be used for directories. They can be identified by I nodes.

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.