1 .\" $NetBSD: install.1,v 1.43 2009/05/01 20:16:23 apb 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
114 .Op Fl l Ar linkflags
120 .Op Fl S Ar stripflag
153 The file(s) are copied
156 option is specified) to the target file or directory.
157 If the destination is a directory, then the
161 with its original filename.
162 If the target file already exists, it is
169 if permissions allow; an alternate backup suffix may be specified via the
177 on the target after installation and stripping
180 ownership, permissions or timestamps are set and before renaming
186 shell, allowing a single
188 argument be to specified to
190 which the shell can then tokenize.
192 Backup any existing files before overwriting them by renaming
196 for specifying a different backup suffix.
200 as the backup suffix if
205 contains a '%' sign, a numbered backup will be performed, and the
206 %-pattern will be expanded using
208 given an integer counter as the backup number.
209 The counter used starts from 0, and the first available name resulting
210 from the expansion is used.
213 This is the default behavior; the flag is maintained for backwards
217 Missing parent directories are created as required.
221 (top of the file hierarchy) that the items are installed in to.
224 is in use, a leading string of
226 will be removed from the file names logged to the
228 This option does not affect where the actual files are installed.
230 Specify the target's file flags.
233 for a list of possible flags and their meanings.)
237 When copying, calculate the digest of the files with
242 .Bl -tag -width rmd160 -offset indent
247 The MD5 cryptographic message digest.
249 The RMD-160 cryptographic message digest.
251 The SHA-1 cryptographic message digest.
255 cryptographic message digest of the file.
259 cryptographic message digest of the file.
263 cryptographic message digest of the file.
265 .It Fl l Ar linkflags
266 Instead of copying the file make a link to the source.
267 The type of the link is determined by the
283 Absolute and relative have effect only for symbolic links.
285 are hard links for files on the same filesystem, symbolic otherwise.
287 Write the metadata associated with each item installed to
293 The metadata includes: the file name and file type, and depending upon
294 other options, the owner, group, file flags, modification time, and tags.
296 Specify an alternative mode.
297 The default mode is set to rwxr-xr-x (0755).
298 The specified mode may be either an octal or symbolic value; see
300 for a description of possible mode values.
302 Use the user database text file
304 and group database text file
308 rather than using the results from the system's
312 (and related) library calls.
316 Preserve the source files access and modification times.
318 Install to a temporary file and then rename the file to its final destination
320 This can be used for precious files, to avoid truncation of the original
321 when error conditions (filesystem full etc.) occur.
326 to strip binaries so that install can be portable over a large
327 number of systems and binary types.
328 If the environment variable
330 is set, it is used as the
333 .It Fl S Ar stripflags
337 as option arguments to
345 shell, allowing a single
347 argument be to specified to
349 which the shell can then tokenize.
360 tags to write out for the file when using
363 Indicate that install is running unprivileged, and that it should not
364 try to change the owner, the group, or the file flags of the destination.
365 The information that would have been updated can be stored in a log
372 preserves all file flags, with the exception of the ``nodump'' flag.
376 utility attempts to prevent copying a file onto itself.
380 creates an empty file.
384 utility exits 0 on success,
385 and \*[Gt]0 if an error occurs.
389 The program used to strip installed binaries when the