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