Per the
Single Unix Specification, the command is specified in the Shell and Utilities (XCU) document.
POSIX includes a similar specification. If neither target file nor target directory are specified, links are created in the current
working directory.
Options The specification indicates command line options that must be supported: • (force)
Clobbers an existing file if the output path specifies an existing file • If a source operand specifies a symbolic link, create a hard link to the link's target file • If a source operand specifies a symbolic link, create a hard link to the symbolic link file • Create symbolic links instead of hard links; causes and to be silently ignored If more than one of the mutually-exclusive options and is specified, the last option specified determines the resulting behavior. If the option is not specified and neither a nor a option is specified, the implementation defines which of the and options is used by default.
Single file invocation The command creates a new link to the path indicated by , stored at the path indicated by . The syntax is as follows: ln [-fs] [-L|-P] source target
Multiple file invocation The command creates a new link to each file specified by the operands, stored in an existing directory indicated by . ln [-fs] [-L|-P] source_1 source_2 ... target_dir ==Examples==