]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/xinstall/install.1
This commit was generated by cvs2svn to compensate for changes in r75937,
[FreeBSD/FreeBSD.git] / usr.bin / xinstall / install.1
1 .\" Copyright (c) 1987, 1990, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     From: @(#)install.1     8.1 (Berkeley) 6/6/93
33 .\" $FreeBSD$
34 .\"
35 .Dd September 22, 1996
36 .Dt INSTALL 1
37 .Os BSD 4.2
38 .Sh NAME
39 .Nm install
40 .Nd install binaries
41 .Sh SYNOPSIS
42 .Nm
43 .Op Fl CcDMpsv
44 .Op Fl f Ar flags
45 .Op Fl g Ar group
46 .Op Fl m Ar mode
47 .Op Fl o Ar owner
48 .Ar file1 file2
49 .Nm
50 .Op Fl CcDMpsv
51 .Op Fl f Ar flags
52 .Op Fl g Ar group
53 .Op Fl m Ar mode
54 .Op Fl o Ar owner
55 .Ar file1
56 \&...
57 .Ar fileN directory
58 .Nm
59 .Fl d
60 .Op Fl v
61 .Op Fl g Ar group
62 .Op Fl m Ar mode
63 .Op Fl o Ar owner
64 .Ar directory
65 \&...
66 .Sh DESCRIPTION
67 The file(s) are moved (or copied if the
68 .Fl c
69 option is specified) to the target file or directory.
70 If the destination is a directory, then the
71 .Ar file
72 is moved into
73 .Ar directory
74 with its original filename.
75 If the target file already exists, it is overwritten if permissions
76 allow.
77 .Pp
78 .Bl -tag -width Ds
79 .It Fl C
80 Copy the file, as if the
81 .Fl c
82 option is specified,
83 except if the target file already exists and the files are the same,
84 then don't change the modification time of the target.
85 .It Fl c
86 Copy the file.
87 This flag turns off the default behavior of
88 .Nm
89 where it deletes the original file after creating the target.
90 .It Fl D
91 Print debugging information.
92 If
93 .Fl D
94 is specified one or more times,
95 then print the renaming steps for
96 .Fl C .
97 If
98 .Fl D
99 is specified two or more times,
100 then warn about files that aren't installed with
101 .Fl C .
102 .It Fl d
103 Create directories. 
104 Missing parent directories are created as required.
105 .It Fl f
106 Specify the target's file flags; see
107 .Xr chflags 1
108 for a list of possible flags and their meanings.
109 .It Fl g
110 Specify a group.
111 A numeric GID is allowed.
112 .It Fl M
113 Disable all use of
114 .Xr mmap 2 .
115 .It Fl m
116 Specify an alternate mode.
117 The default mode is set to rwxr-xr-x (0755).
118 The specified mode may be either an octal or symbolic value; see
119 .Xr chmod  1
120 for a description of possible mode values.
121 .It Fl o
122 Specify an owner.
123 A numeric UID is allowed.
124 .It Fl p
125 Preserve the modification time.
126 Copy the file, as if the
127 .Fl C
128 (Compare and copy) option is specified,
129 except if the target file doesn't already exist or is different,
130 then preserve the modification time of the file.
131 .It Fl s
132 .Nm Install
133 exec's the command
134 .Xr strip  1
135 to strip binaries so that install can be portable over a large
136 number of systems and binary types.
137 .It Fl v
138 Causes
139 .Nm
140 to show when
141 .Fl C
142 acutally installs something.
143 .El
144 .Pp
145 By default,
146 .Nm
147 preserves all file flags, with the exception of the ``nodump'' flag.
148 .Pp
149 The
150 .Nm
151 utility attempts to prevent moving a file onto itself.
152 .Pp
153 Installing
154 .Pa /dev/null
155 creates an empty file.
156 .Sh DIAGNOSTICS
157 The
158 .Nm
159 utility exits 0 on success, and 1 otherwise.
160 .Sh FILES
161 .Bl -tag -width INS@XXXX -compact
162 .It Pa INS@XXXX
163 If the
164 .Fl C
165 or
166 .Fl p
167 option is used, then temporary files named INS@XXXX,
168 where XXXX is decided by
169 .Xr mkstemp 3 ,
170 are created in the target directory.
171 .El
172 .Sh SEE ALSO
173 .Xr chflags 1 ,
174 .Xr chgrp 1 ,
175 .Xr chmod 1 ,
176 .Xr cp 1 ,
177 .Xr mv 1 ,
178 .Xr strip 1 ,
179 .Xr mmap 2 ,
180 .Xr chown 8
181 .Sh HISTORY
182 The
183 .Nm
184 utility appeared in
185 .Bx 4.2 .
186 .Sh BUGS
187 Temporary files may be left in the target directory if
188 .Nm
189 exits abnormally.
190 .Pp
191 File flags cannot be set by
192 .Xr fchflags 2
193 over a NFS file system.  Other file systems do not have a concept of flags.
194 .Nm
195 will only warn when flags could not be set on a file system
196 that does not support them.
197 .Pp
198 .Nm
199 with
200 .Fl v
201 falsely says a file is copied when
202 .Fl C
203 snaps hard links.