ln, link -- make file system links

ln [-fhinsv] originalFile [newlink]
ln [-fhinsv] originalFile ... link_dir
link originalFile newlink

Creates a new directory entry (newlink) with the same modes as the original file.
Used to create multiple appearances of a file.
newlink points to the originalFile.

-i interactivey prompts standard error with:"replace newlink?" if newlink exists.
A response from standard input begining with y unlinks ( deletes ) newlink then creates newlink.
-i overrides any previous -f

-f force creation if the newlink file already exists.
-f overrides any previous -i .

-v verbose, showing files as they are processed, as in ln -v prefix*

-h,n If the newlink_file or link_dir is a symbolic link, do not follow it. This is most useful with -f , to replace a symlink which may point to a directory.

-s Create a symbolic link. ( no message is generated if original file does not exist! and return code is zero!)

The types of links are: hard links and symbolic links.

Given one or two arguments, ln creates a hard link to an existing originalFile.

newlink may be a directory in which to place the new link; otherwise it is placed in the current directory.
If only the directory is specified, the link will be made to the last component of source_file.

Given more than two arguments, ln makes links in link_dir to all the named source files. The links made will have the same name as the files being linked to.

link takes exactly two filenames and creates a hard link. No options may be supplied.

SEE lstat,readlink,stat,symlink,symlink(7)

BUG: ln -s nofile newlink does not display a message if nofile does not exist and return code is set to 0!
Perhaps alias ln='ln

BSD December 30, 1993 BSD