1 .\" $NetBSD: install.1,v 1.47 2012/04/08 22:00:40 wiz Exp $
3 .\" Copyright (c) 1987, 1990, 1993
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" @(#)install.1 8.1 (Berkeley) 6/6/93
85 The file(s) are copied
88 option is specified) to the target file or directory.
89 If the destination is a directory, then the
93 with its original filename.
94 If the target file already exists, it is
101 if permissions allow; an alternate backup suffix may be specified via the
105 .Bl -tag -width XsXXstripflagsXX
109 on the target after installation and stripping
112 ownership, permissions or timestamps are set and before renaming
118 shell, allowing a single
120 argument be to specified to
122 which the shell can then tokenize.
126 as the backup suffix if
131 contains a '%' sign, a numbered backup will be performed, and the
132 %-pattern will be expanded using
134 given an integer counter as the backup number.
135 The counter used starts from 0, and the first available name resulting
136 from the expansion is used.
138 Backup any existing files before overwriting them by renaming
142 for specifying a different backup suffix.
145 This is the default behavior; the flag is maintained for backwards
150 (top of the file hierarchy) that the items are installed in to.
153 is in use, a leading string of
155 will be removed from the file names logged to the
157 This option does not affect where the actual files are installed.
160 Missing parent directories are created as required.
162 Specify the target's file flags.
165 for a list of possible flags and their meanings.)
169 When copying, calculate the digest of the files with
174 .Bl -tag -width rmd160 -offset indent
179 The MD5 cryptographic message digest.
181 The RMD-160 cryptographic message digest.
183 The SHA-1 cryptographic message digest.
187 cryptographic message digest of the file.
191 cryptographic message digest of the file.
195 cryptographic message digest of the file.
197 .It Fl l Ar linkflags
198 Instead of copying the file make a link to the source.
199 The type of the link is determined by the
215 Absolute and relative have effect only for symbolic links.
217 are hard links for files on the same filesystem, symbolic otherwise.
219 Write the metadata associated with each item installed to
225 The metadata includes: the file name and file type, and depending upon
226 other options, the owner, group, file flags, modification time, and tags.
228 Specify an alternative mode.
229 The default mode is set to rwxr-xr-x (0755).
230 The specified mode may be either an octal or symbolic value; see
232 for a description of possible mode values.
234 Use the user database text file
236 and group database text file
240 rather than using the results from the system's
244 (and related) library calls.
248 Preserve the source files access and modification times.
250 Install to a temporary file and then rename the file to its final destination
252 This can be used for precious files, to avoid truncation of the original
253 when error conditions (filesystem full etc.) occur.
254 .It Fl S Ar stripflags
258 as option arguments to
266 shell, allowing a single
268 argument be to specified to
270 which the shell can then tokenize.
282 to strip binaries so that install can be portable over a large
283 number of systems and binary types.
284 If the environment variable
286 is set, it is used as the
292 tags to write out for the file when using
295 Indicate that install is running unprivileged, and that it should not
296 try to change the owner, the group, or the file flags of the destination.
297 The information that would have been updated can be stored in a log
304 preserves all file flags, with the exception of the ``nodump'' flag.
308 utility attempts to prevent copying a file onto itself.
312 creates an empty file.
316 The program used to strip installed binaries when the