All commands
ln
Topic: Files and folders
Program: ln
Creates hard or symbolic links.
Package: core-inodes
Usage
ln [OPTION]... TARGET... [LINK_NAME|DIRECTORY]
Description
Give TARGET a second name LINK_NAME (a hard link), or with -s a symlink that stores the path TARGET.
Without LINK_NAME the link is made in the current directory; with a DIRECTORY at the end, inside it.
Options in the simulator
-
-s, --symbolic create a symlink that stores the path, not a second name -
-f, --force replace a link name that already exists -
-v, --verbose print each link that was made -
-r, --relative with -s, store the path relative to the link -
-n, --no-dereference take LINK_NAME as it is, even if it leads to a folder -
-T, --no-target-directory LINK_NAME is always the name of the new link -
--help show this help and exit
10 more options of the real program, not in the simulator yet
-
--backup value optional not in the simulator yet On a real system ln first keeps a name it replaces as a backup copy ending in ~.
-
-b not in the simulator yet On a real system ln first keeps a name it replaces as a backup copy ending in ~.
-
-d, --directory not in the simulator yet On a real system root may try a hard link to a directory with it; the file system almost always refuses.
-
-F not in the simulator yet On a real system root may try a hard link to a directory with it; the file system almost always refuses.
-
-i, --interactive not in the simulator yet On a real system ln asks before it replaces a name that already exists.
-
-L, --logical not in the simulator yet On a real system it decides whether a hard link to a symlink gets the link itself or its target.
-
-P, --physical not in the simulator yet On a real system it decides whether a hard link to a symlink gets the link itself or its target.
-
-S, --suffix needs a value not in the simulator yet On a real system it picks the ending of the backup copy instead of ~.
-
-t, --target-directory needs a value not in the simulator yet On a real system it names the directory for the new links before the sources.
-
--version not in the simulator yet On a real system it prints the version of the program.
Where you learn it
Lessons
All commands