ln, link -- make File System links

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

Creates a new directory entry with the same attributes as the original file.
creates multiple appearances of a file, perhaps in a different directory or to provide a consistant reference for new versions 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.
overrides any previous -f
-f force creation if the newlink file already exists.
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. 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!)

hard link and symbolic link.

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