Linux ln commands

Source: Internet
Author: User
The ln command on linux details that ln is another very important command in linux. its function is to create a non-same link for a file in another location, the most common parameter of this command is-s. its usage is ln & amp; ndash; s. the target file of the source file. When we need...
The ln command on linux details that ln is another very important command in linux. its function is to create a non-same link for a file in another location, the most common parameter of this command is-s. The specific usage is the target file of the ln-s source file. When we need to use the same file in different directories, we do not need to put a file that must be the same under each required Directory. we only need to put it in a fixed directory, put the file, and then use the ln command link in other directories to link it, without occupying disk space repeatedly. For example, ln-s/bin/less/usr/local/bin/less-s indicates the symbol (symbolic. Www.2cto.com there are two points to note: first, the ln command will keep the synchronization of each link file, that is, no matter where you change it, other files will change the same; second, there are two types of ln links: soft link and hard link. the soft link is ln-s *****. it will only generate a file image at your selected location, it does not occupy disk space. the hard link ln *** has no parameter-s. it will generate a file of the same size as the source file at the selected position, both soft links and hard links are synchronized. Note: There is a so-called link in the Linux/Unix file system. we can regard it as the alias of the file, and the link can be divided into two types: hard link) symbolic link indicates that a file can have multiple names, while a soft link generates a special file, the content of this file points to another file. Hard links exist in the same file system, but soft links can span different file systems. Ln source dist is used to generate a connection (dist) to the source. As for hard link or soft link, it is determined by the parameter. No matter whether it is a hard link or soft link, it will not copy the original file, it will only occupy a very small amount of disk space. -F: when the link is closed, the file with the same name as The dist is first deleted www.2cto.com-d: allows the system administrator to hard link his Directory-I: when deleting an archive with the same name as dist, first ask-n: During soft link, dist will be treated as a general Archive-s: perform soft link (symbolic link)-v: display file name B before Link: back up the file that will be overwritten or deleted at link end-S SUFFIX: add the backup file to the end of SUFFIX-v method: specifies the backup METHOD -- help: displays the auxiliary instructions -- version: displays the version
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.