LN(1)

NAME
ln - make a link

SYNOPSIS
ln [-f] [-n] [-s] name1 [name2 . . . ] target

DESCRIPTION
A link is a directory entry referring to a file; the same file (together with its size, all its protection information, etc.) may have several links to it. There is no way to distinguish a link to a file from its original directory entry; any changes in the file are effective independently of the name by which the file is known.

Ln creates a link named target to an existing file name1. If target is a directory, more than one name may be given, and the links are placed in that directory, with the name of the last pathname component.

It is forbidden to link to a directory or to link across file systems. It is, however, possible to create a symbolic link even in this case; see the -s option below.

The ln command accepts the following options:

-f  If the target file exists, an attempt is made to unlink it before the new link is created, regardless of file permissions. This option is ignored with /usr/lib/heirloom-tools/5bin/ln and /usr/lib/heirloom-tools/5bin/s42/ln if the -s option is also given.

-n  Do not remove an existing target file even if the user has write permission on it. This is the default for /usr/lib/heirloom-tools/5bin/posix/ls and /usr/lib/heirloom-tools/5bin/posix2001/ls.

-s  Create a symbolic link, that is a special file containing the pathname of the target file. The system will resolve this pathname when the symbolic link is accessed. A symbolic link can refer to all types of files and span device boundaries, but will become stale if the target file is removed. An existing target file will not be overwritten.

SEE ALSO
cp(1), mv(1), link(2), symlink(2)