Annotation of othersrc/bin/fsu_ln/fsu_ln.1, Revision 1.2
1.2 ! stacktic 1: .\" $NetBSD: fsu_ln.1,v 1.1 2009/03/23 21:03:57 stacktic Exp $
1.1 stacktic 2: .\" from
3: .\" NetBSD: ln.1,v 1.22 2007/10/29 11:22:59 jnemeth Exp
4: .\"
5: .\" Copyright (c) 1980, 1990, 1993
6: .\" The Regents of the University of California. All rights reserved.
7: .\"
8: .\" This code is derived from software contributed to Berkeley by
9: .\" the Institute of Electrical and Electronics Engineers, Inc.
10: .\"
11: .\" Redistribution and use in source and binary forms, with or without
12: .\" modification, are permitted provided that the following conditions
13: .\" are met:
14: .\" 1. Redistributions of source code must retain the above copyright
15: .\" notice, this list of conditions and the following disclaimer.
16: .\" 2. Redistributions in binary form must reproduce the above copyright
17: .\" notice, this list of conditions and the following disclaimer in the
18: .\" documentation and/or other materials provided with the distribution.
19: .\" 3. Neither the name of the University nor the names of its contributors
20: .\" may be used to endorse or promote products derived from this software
21: .\" without specific prior written permission.
22: .\"
23: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33: .\" SUCH DAMAGE.
34: .\"
35: .\" @(#)ln.1 8.2 (Berkeley) 12/30/93
36: .\"
1.2 ! stacktic 37: .Dd November 15, 2009
1.1 stacktic 38: .Dt FSU_LN 1
39: .Os
40: .Sh NAME
41: .Nm fsu_ln
42: .Nd make links from a file system image through rump
43: .Sh SYNOPSIS
44: .Nm
1.2 ! stacktic 45: .Op Fl o Ar opt_args
! 46: .Op Fl s Ar fs_spec_args
! 47: .Op Fl t Ar fstype
! 48: .Op Fl f
! 49: .Ar fsdevice
1.1 stacktic 50: .Op Fl fhinsv
51: .Ar fstype fsdevice source_file
52: .Op Ar target_file
53: .Nm
1.2 ! stacktic 54: .Op Fl o Ar opt_args
! 55: .Op Fl s Ar fs_spec_args
! 56: .Op Fl t Ar fstype
! 57: .Op Fl f
! 58: .Ar fsdevice
1.1 stacktic 59: .Op Fl fhinsv
60: .Ar fstype fsdevice source_file ... target_dir
61: .Sh DESCRIPTION
62: The
63: .Nm
64: utility creates a new directory entry (linked file) which has the
65: same modes as the original file on the
66: .Ar fstype
67: file system image contained in
68: .Ar fsdevice .
69: It is useful for maintaining multiple copies of a file in many places
70: at once without using up storage for the
71: .Dq copies ;
72: instead, a link
73: .Dq points
74: to the original copy.
75: There are two types of links; hard links and symbolic links.
76: How a link
77: .Dq points
78: to a file is one of the differences between a hard or symbolic link.
79: .Pp
80: The options are as follows:
81: .Bl -tag -width flag
82: .It Fl f
83: Unlink any already existing file, permitting the link to occur.
84: .It Fl h
85: If the
86: .Ar target_file
87: or
88: .Ar target_dir
89: is a symbolic link, do not follow it.
90: This is most useful with the
91: .Fl f
92: option, to replace a symlink which may point to a directory.
93: .It Fl i
94: Cause
95: .Nm
96: to write a prompt to standard error if the target file exists.
97: If the response from the standard input begins with the character
98: .Sq Li y
99: or
100: .Sq Li Y ,
101: then unlink the target file so that the link may occur.
102: Otherwise, do not attempt the link.
103: (The
104: .Fl i
105: option overrides any previous
106: .Fl f
107: options.)
108: .It Fl n
109: Same as
110: .Fl h ,
111: for compatibility with other
112: .Nm
113: implementations.
114: .It Fl s
115: Create a symbolic link.
116: .It Fl v
117: Cause
118: .Nm
119: to be verbose, showing files as they are processed.
120: .El
121: .Pp
122: By default
123: .Nm
124: makes
125: .Em hard
126: links.
127: A hard link to a file is indistinguishable from the original directory entry;
128: any changes to a file are effective independent of the name used to reference
129: the file.
130: Hard links may not normally refer to directories and may not span file systems.
131: .Pp
132: A symbolic link contains the name of the file to
133: which it is linked.
134: The referenced file is used when an
135: .Xr open 2
136: operation is performed on the link.
137: A
138: .Xr stat 2
139: on a symbolic link will return the linked-to file; an
140: .Xr lstat 2
141: must be done to obtain information about the link.
142: The
143: .Xr readlink 2
144: call may be used to read the contents of a symbolic link.
145: Symbolic links may span file systems and may refer to directories.
146: .Pp
147: Given one or two arguments,
148: .Nm
149: creates a link to an existing file
150: .Ar source_file .
151: If
152: .Ar target_file
153: is given, the link has that name;
154: .Ar target_file
155: may also be a directory in which to place the link;
156: otherwise it is placed in the current directory.
157: If only the directory is specified, the link will be made
158: to the last component of
159: .Ar source_file .
160: .Pp
161: Given more than two arguments,
162: .Nm
163: makes links in
164: .Ar target_dir
165: to all the named source files.
166: The links made will have the same name as the files being linked to.
CVSweb <webmaster@jp.NetBSD.org>