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 install 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 install 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 install 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 67The file(s) are moved (or copied if the 68.Fl c 69option is specified) to the target file or directory. 70If the destination is a directory, then the 71.Ar file 72is moved into 73.Ar directory 74with its original filename. 75If the target file already exists, it is overwritten if permissions 76allow. 77.Pp 78.Bl -tag -width Ds 79.It Fl C 80Copy the file, as if the 81.Fl c 82option is specified, 83except if the target file already exists and the files are the same, 84then don't change the modification time of the target. 85.It Fl c 86Copy the file. 87This flag turns off the default behavior of 88.Nm install 89where it deletes the original file after creating the target. 90.It Fl D 91Print debugging information. 92If 93.Fl D 94is specified one or more times, 95then print the renaming steps for 96.Fl C . 97If 98.Fl D 99is specified two or more times, 100then warn about files that aren't installed with 101.Fl C . 102.It Fl d 103Create directories. 104Missing parent directories are created as required. 105.It Fl f 106Specify the target's file flags; see 107.Xr chflags 1 108for a list of possible flags and their meanings. 109.It Fl g 110Specify a group. A numeric GID is allowed. 111.It Fl M 112Disable all use of 113.Xr mmap 2 . 114.It Fl m 115Specify an alternate mode. 116The default mode is set to rwxr-xr-x (0755). 117The specified mode may be either an octal or symbolic value; see 118.Xr chmod 1 119for a description of possible mode values. 120.It Fl o 121Specify an owner. A numeric UID is allowed. 122.It Fl p 123Preserve the modification time. 124Copy the file, as if the 125.Fl C 126(Compare and copy) option is specified, 127except if the target file doesn't already exist or is different, 128then preserve the modification time of the file. 129.It Fl s 130.Nm Install 131exec's the command 132.Xr strip 1 133to strip binaries so that install can be portable over a large 134number of systems and binary types. 135.It Fl v 136Causes 137.Nm 138to show when 139.Fl C 140acutally installs something. 141.El 142.Pp 143By default, 144.Nm 145preserves all file flags, with the exception of the ``nodump'' flag. 146.Pp 147The 148.Nm 149utility attempts to prevent moving a file onto itself. 150.Pp 151Installing 152.Pa /dev/null 153creates an empty file. 154.Pp 155Upon successful completion a value of 0 is returned. 156Otherwise, a value of 1 is returned. 157.Sh FILES 158.Bl -tag -width INS@XXXX -compact 159.It Pa INS@XXXX 160If the 161.Fl C 162or 163.Fl p 164option is used, then temporary files named INS@XXXX, 165where XXXX is decided by 166.Xr mkstemp 3 , 167are created in the target directory. 168.Sh SEE ALSO 169.Xr chflags 1 , 170.Xr chgrp 1 , 171.Xr chmod 1 , 172.Xr cp 1 , 173.Xr mv 1 , 174.Xr strip 1 , 175.Xr mmap 2 , 176.Xr chown 8 177.Sh HISTORY 178The 179.Nm 180utility appeared in 181.Bx 4.2 . 182.Sh BUGS 183Temporary files may be left in the target directory if 184.Nm 185exits abnormally. 186.Pp 187File flags cannot be set by 188.Xr fchflags 2 189over a NFS file system. Other file systems do not have a concept of flags. 190.Nm 191will only warn when flags could not be set on a file system 192that does not support them. 193.Pp 194.Nm 195with 196.Fl v 197falsely says a file is copied when 198.Fl C 199snaps hard links. 200