File System - ( Symbolic | ln | Soft) link - File Alias - Symlink - Reparse Points

1 - About

Alternatively referred to as a soft link or symlink, a symbolic link is a file that links to another file using the path. Unlike a hard link, a symbolic link can link to any file on any computer.

3 - Operating System

3.1 - Linux

They are created with the ln command .

They are created with the ln command and the -s parameter:

ln -s /etc/dbora /etc/rc.d/rc2.d/S99dbora

ln -s /the/real/fle /the/sym/link

Remove Without trailing slash:

  • unlink

unlink /the/sym/link

  • or remove

# rm /the/sym/link/ <- Bad
rm /the/sym/link

3.2 - Windows

3.2.1 - Dos

Windows shortcut are not symbolic link


Creates a symbolic link.

MKLINK [[/D] | [/H] | [/J]] Link Target

        /D      Creates a directory symbolic link.  Default is a file
                symbolic link.
        /H      Creates a hard link instead of a symbolic link. (Works only with files ? See option /D)
        /J      Creates a Directory Junction.
        Link    specifies the new symbolic link name.
        Target  specifies the path (relative or absolute) that the new link
                refers to.

Example for:

  • a file

mklink  sourceFile targetSymlink
REM with a php ini file
mklink  C:\php-7.2.6-Win32-VC15-x64\php.ini D:\repo_backup\php.ini

symbolic link created for C:\php-7.2.6-Win32-VC15-x64\php.ini <<===>> D:\repo_backup\php.ini

  • A directory

mklink  directory symlink

REM example for the preferences directory of Eclipse
mklink /D "D:\workspace\.metadata\.plugins\org.eclipse.core.runtime" "D:\svn\Config\Eclipseorg.eclipse.core.runtime"

symbolic link created for D:\workspace\.metadata\.plugins\org.eclipse.core.runtime <<===>> D:\svn\Config\Eclipse\org.eclipse.core.runtime

  • List: the dir command show the target of symbolic links (called Reparse Points)

dir /a:l

/A          Displays files with specified attributes.
  attributes   D  Directories                R  Read-only files
               H  Hidden files               A  Files ready for archiving
               S  System files               I  Not content indexed files
               L  Reparse Points             -  Prefix meaning not

3.2.2 - Powershell

4 - Documentation / Reference

Data Science
Data Analysis
Data Science
Linear Algebra Mathematics

Powered by ComboStrap