FreeBSD Bugzilla – Attachment 25801 Details for
Bug 44074
[patch] ln(1) manual clarifications
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 4.92 KB, created by
Gary W. Swearingen
on 2002-10-15 04:30:02 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Gary W. Swearingen
Created:
2002-10-15 04:30:02 UTC
Size:
4.92 KB
patch
obsolete
>--- /tmp/ln..orig.1 Sun Oct 13 17:33:39 2002 >+++ /tmp/ln.1 Mon Oct 14 19:42:12 2002 >@@ -41,38 +41,46 @@ > .Sh NAME > .Nm ln , > .Nm link >-.Nd make links >+.Nd make soft links (symbolic links, symlinks) and hard links > .Sh SYNOPSIS > .Nm > .Op Fl fhinsv >-.Ar source_file >-.Op Ar target_file >+.Ar to_filename >+.Op Ar from_filename > .Nm > .Op Fl fhinsv >-.Ar source_file ... >-.Ar target_dir >+.Ar to_filename ... >+.Ar dir_filename > .Nm link >-.Ar source_file Ar target_file >+.Ar to_existing_filename Ar from_alternate_filename > .Sh DESCRIPTION > The > .Nm >-utility creates a new directory entry (linked file) which has the >-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 ; >-instead, a link >-.Dq points >-to the original copy. >-There are two types of links; hard links and symbolic links. >-How a link >-.Dq points >-to a file is one of the differences between a hard and symbolic link. >+utility creates a new filesystem entry which can refer to an existing file >+.Pq or multiple such entries with the second form . >+It is useful for maintaining multiple virtual copies of a file in many places >+while using filesystem storage for only one file. >+Two types of links may be made: >+.Nm ln >+can make >+.Em soft links >+or >+.Em hard links , >+while >+.Nm link >+can make only hard links. >+Note that soft links are also called >+.Em symbolic links >+and >+.Em symlinks . >+The two types are described following the option descriptions. > .Pp > The options are as follows: > .Bl -tag -width flag > .It Fl f >-If the target file already exists, >+If the >+.Qq from >+file already exists, > then unlink it so that the link may occur. > (The > .Fl f >@@ -81,21 +89,25 @@ > options.) > .It Fl h > If the >-.Ar target_file >+.Ar from_filename > or >-.Ar target_dir >-is a symbolic link, do not follow it. This is most useful with the >+.Ar dir_filename >+is a soft link, do not follow it. This is most useful with the > .Fl f >-option, to replace a symlink which may point to a directory. >+option, to replace a soft link which may point to a directory. > .It Fl i > Cause > .Nm >-to write a prompt to standard error if the target file exists. >+to write a prompt to standard error if the >+.Qq from >+file exists. > If the response from the standard input begins with the character > .Sq Li y > or > .Sq Li Y , >-then unlink the target file so that the link may occur. >+then unlink the >+.Qq from >+file so that the link may occur. > Otherwise, do not attempt the link. > (The > .Fl i >@@ -109,7 +121,7 @@ > .Nm > implementations. > .It Fl s >-Create a symbolic link. >+Create a soft link. > .It Fl v > Cause > .Nm >@@ -118,47 +130,50 @@ > .Pp > By default, > .Nm >-makes >-.Em hard >-links. >-A hard link to a file is indistinguishable from the original directory entry; >+makes hard links. >+A hard link to a file is indistinguishable from the original filesystem entry; > any changes to a file are effectively independent of the name used to reference > the file. >+Unlike with soft links, >+both old and new filesystem entries become links to each other >+.Pq and to other files to which either is hard linked . > Hard links may not normally refer to directories and may not span filesystems. > .Pp >-A symbolic link contains the name of the file to >+A soft link contains the name of the file to > which it is linked. The referenced file is used when an > .Xr open 2 > operation is performed on the link. > A > .Xr stat 2 >-on a symbolic link will return the linked-to file; an >+on a soft link will return the linked-to file; an > .Xr lstat 2 > must be done to obtain information about the link. > The > .Xr readlink 2 >-call may be used to read the contents of a symbolic link. >-Symbolic links may span filesystems and may refer to directories. >+call may be used to read the contents of a soft link. >+Soft links may span filesystems and may refer to directories. > .Pp > Given one or two arguments, > .Nm > creates a link to an existing file >-.Ar source_file . >+.Ar to_filename . > If >-.Ar target_file >+.Ar from_filename > is given, the link has that name; >-.Ar target_file >+.Ar from_filename > may also be a directory in which to place the 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 >-.Ar source_file . >+.Ar to_filename . > .Pp > Given more than two arguments, > .Nm > makes links in >-.Ar target_dir >-to all the named source files. >+.Ar dir_filename >+to all the named >+.Qq to >+files. > The links made will have the same name as the files being linked to. > .Pp > When the utility is called as >@@ -169,6 +184,16 @@ > which performs a > .Xr link 2 > operation using the two passed arguments. >+.Sh NOTES >+Soft links require careful use to ensure that the >+.Qq to >+filename is used rather than the >+.Qq from >+filename, and vice-versa. >+Their handling by programs is not completely standardized. >+Some often-followed conventions, notable exceptions, >+and related discussion may be found in >+.Xr symlink 7 . > .Sh SEE ALSO > .Xr link 2 , > .Xr lstat 2 ,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 44074
: 25801