- link and unlink files and directories
/usr/sbin/link existing-file new-file
/usr/xpg4/bin/link existing-file new-file
The link and unlink commands link and unlink files and directories. Only super-users can use these commands on directories.
Use link to create a new file that points to an existing file. The existing-file and new-file operands specify the existing file and newly-created files. See OPERANDS.
Note that the ZFS file system does not support links between directories.
If the existing file being hard linked is itself a symbolic link, then the newly created file (new-file) will be a hard link to the file referenced by the symbolic link, not to the symbolic link object itself (existing-file).
The following operands are supported:
Specifies the name of the existing file to be linked.
Specifies the name of the file to be unlinked.
Specifies the name of newly created (linked) file.
See environ(5) for descriptions of the following environment variables that affect the execution of link: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, and NLSPATH.
See attributes(5) for descriptions of the following attributes: