Liunx and win in the soft links detailed

Source: Internet
Author: User

Linux friends know that there is a concept of soft links in Linux, you can create a soft link to a directory or a file through the ln command, the advantage of soft links is that a directory or file can have multiple portals but maintain a single physical location, easy to apply and manage.

1. Command format:

ln [parameter] [source file or directory] [destination file or directory]

2. Command format:
necessary Parameters :-b Delete, overwrite previously established link -d allow super user to make directory hard link -f enforce -i interactive mode, file presence Prompt user whether overwrite - N treats symbolic links as generic directories -s Soft links (symbolic links)-V displays detailed processing procedures

3. Usage Examples:

# ln-sf file1 file2 where File1 is the name of the software link , File2 is the path to the actual file and can be accessed by file1 in the future file2

A similar soft link can be created with the Mklink command in the Win7 operating system.

D:\temp>mklink/? creates a symbolic link. MKLINK [[/d] | [H] | [/J]] Link Target         /D      Creates a directory symbolic link. The default is a file                symbolic link.         /H      creates a hard link instead of a symbolic link.         /J      Create a directory join.        link    Specifies the new symbolic link name.        Target  Specifies the path                (relative or absolute) referenced by the new link. 

Example:

mklink/j FileNew Fileold

Liunx and win in the soft links detailed

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.