BSD 4_4_Lite1 release
[unix-history] / usr / src / bin / ln / ln.1
index fc07c6f..fd85a6b 100644 (file)
@@ -1,14 +1,40 @@
-.\" Copyright (c) 1980, 1990 The Regents of the University of California.
-.\" All rights reserved.
+.\" Copyright (c) 1980, 1990, 1993
+.\"    The Regents of the University of California.  All rights reserved.
 .\"
 .\" This code is derived from software contributed to Berkeley by
 .\" the Institute of Electrical and Electronics Engineers, Inc.
 .\"
 .\"
 .\" This code is derived from software contributed to Berkeley by
 .\" the Institute of Electrical and Electronics Engineers, Inc.
 .\"
-.\" %sccs.include.redist.roff%
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"    This product includes software developed by the University of
+.\"    California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
 .\"
 .\"
-.\"    @(#)ln.1        6.10 (Berkeley) %G%
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
 .\"
 .\"
-.Dd 
+.\"    @(#)ln.1        8.2 (Berkeley) 12/30/93
+.\"
+.Dd December 30, 1993
 .Dt LN 1
 .Os BSD 4
 .Sh NAME
 .Dt LN 1
 .Os BSD 4
 .Sh NAME
@@ -27,7 +53,7 @@
 The
 .Nm ln
 utility creates a new directory entry (linked file) which has the
 The
 .Nm ln
 utility creates a new directory entry (linked file) which has the
-same modes as the orginal file.
+same modes as the original file.
 It is useful for maintaining multiple copies of a file in many places
 at once without using up storage for the
 .Dq copies ;
 It is useful for maintaining multiple copies of a file in many places
 at once without using up storage for the
 .Dq copies ;
@@ -91,94 +117,13 @@ makes links in
 .Ar target_dir
 to all the named source files.
 The links made will have the same name as the files being linked to.
 .Ar target_dir
 to all the named source files.
 The links made will have the same name as the files being linked to.
-.Sh SYMBOLIC LINK FOLLOWING
-Many file system traversal utilities and system calls
-have the option of traversing the file system in a physical traversal, i.e., 
-treating a symbolic link as a link rather than its target, or in a logical
-traversal, i.e., following the symbolic link whenever one is encountered.
-The following rules summarize the conventions of symbolic link following in 
-utilities and system calls.
-.Pp
-The only system calls that operate on symbolic links are 
-.Xr unlink 2 ,
-.Xr rename 2 ,
-.Xr lstat 2 ,
-and
-.Xr readlink 2 .
-All other system calls follow the symbolic link and operate on the object
-which the link points to.
-.Pp
-Utilities that do not recurse over trees always
-follow symbolic links on the command line.  The rest of the utilities
-.Xr (chown 8 ,
-.Xr chmod 1 ,
-.Xr chgrp 1 ,
-.Xr chflags 1 ,
-.Xr cp 1 ,
-.Xr du 1 ,
-.Xr find 1 ,
-and
-.Xr tar 1 )
-treat symbolic links in three distinct ways.  The first option, the default,
-is to never follow any symbolic link.  The second, specified by the
-.Fl H 
-flag, causes the utility to follow symbolic links only on the command line
-but not in the tree of traversal (if recursive).  The third option, specified
-by the 
-.Fl h
-flag, causes the utility to follow any symbolic link encountered on the command
-line and in the tree of traversal (if recursive).
-.Pp
-The purpose of the 
-.Fl H
-flag is to make the command line name space look like the logical name space,
-i.e., make all names on the command line appear as hard links, whereas the
-purpose of the
-.Fl h
-flag is to make the entire hierarchy look like the logical name space. i.e., 
-make all names in the hierarchy appear as hard links.
-.Pp
-Exceptions to these rules are the behaviors of 
-.Xr rm  1 ,
-.Xr mv 1 ,
-and
-.Xr ls  1 .
-.Pp
-.Xr Rm 1 
-and
-.Xr mv 1
-operate on the name, not the object it points to, and therefore always operate
-on the symbolic link itself and do not follow it.
-.Pp
-For historical reasons,
-.Xr ls 1
-follows symbolic links in the entire hierarchy (including command line)
-only when the 
-.Fl L 
-option is specified, and follows only on the command line only 
-when neither of the 
-.Fl F, d, 
-or 
-.Fl l
-options are specified. In all other cases, 
-.Xr ls 1 
-does not follow symbolic links.
 .Sh SEE ALSO
 .Sh SEE ALSO
-.Xr rm 1 ,
-.Xr cp 1 ,
-.Xr mv 1 ,
-.Xr ls 1 ,
-.Xr tar 1 ,
-.Xr chown 8 ,
-.Xr chmod 1 ,
-.Xr chgrp 1 ,
-.Xr chflags 1 ,
-.Xr du 1 ,
-.Xr find 1 ,
 .Xr link 2 ,
 .Xr link 2 ,
+.Xr lstat 2 ,
 .Xr readlink 2 ,
 .Xr stat 2 ,
 .Xr readlink 2 ,
 .Xr stat 2 ,
-.Xr symlink 2
+.Xr symlink 2 ,
+.Xr symlink 7
 .Sh HISTORY
 A
 .Nm ln
 .Sh HISTORY
 A
 .Nm ln