1 .\" $OpenBSD: install.1,v 1.30 2016/05/13 17:51:15 jmc Exp $
2 .\" $NetBSD: install.1,v 1.4 1994/11/14 04:57:17 jtc Exp $
4 .\" Copyright (c) 1987, 1990, 1993
5 .\" The Regents of the University of California. All rights reserved.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
15 .\" 3. Neither the name of the University nor the names of its contributors
16 .\" may be used to endorse or promote products derived from this software
17 .\" without specific prior written permission.
19 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .\" @(#)install.1 8.1 (Berkeley) 6/6/93
33 .Dd $Mdocdate: May 13 2016 $
46 .Ar source ... target ...
50 file(s) are copied to the
55 file already exists, it is either renamed to
62 An alternate backup suffix may be specified via the
69 directories are created, and no files are copied.
71 The options are as follows:
72 .Bl -tag -width "-B suffix"
76 as the backup suffix if
80 Backup any existing files before overwriting them by renaming
85 for specifying a different backup suffix.
88 If the target file already exists and the files are the same,
89 then don't change the modification time of the target.
92 This is actually the default.
95 option is only included for backwards compatibility.
97 Create all leading components of the target before installing into it.
100 Missing parent directories are created as required.
101 This option cannot be used with the
108 Flush the file's contents to disk.
109 When copying a file, use the
111 function to synchronize the installed file's contents with the
116 A numeric GID is allowed.
120 The default mode is set to 0755.
121 The specified mode must be an octal value; see
123 for a description of possible mode values.
127 A numeric UID is allowed.
129 Preserve the modification time.
130 Copy the file, as if the
132 (compare and copy) option is specified,
133 except if the target file doesn't already exist or is different,
134 then preserve the modification time of the file.
139 unlinks an existing target before installing the new file.
142 flag a temporary file is used and then renamed to be
144 The reason this is safer is that if the copy or
145 rename fails, the existing target is left untouched.
150 to strip binaries so that install can be portable over a large
151 number of systems and binary types.
152 If the environment variable
154 is set, it is used instead.
159 utility attempts to prevent moving a file onto itself.
163 creates an empty file.
165 .Bl -tag -width "STRIP"
174 .Bl -tag -width INS@XXXXXXXXXX -compact
175 .It Pa INS@XXXXXXXXXX
178 option is specified, or the
182 option is used in conjunction with the
184 option, temporary files named INS@XXXXXXXXXX,
185 where XXXXXXXXXX is decided by
187 are created in the target directory.
211 flags are non-standard and should not be relied upon for portability.
213 Temporary files may be left in the target directory if