xref: /freebsd/usr.bin/xinstall/install.1 (revision 17ee9d00bc1ae1e598c38f25826f861e4bc6c3ce)
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.\"     @(#)install.1	8.1 (Berkeley) 6/6/93
33.\"
34.Dd June 6, 1993
35.Dt INSTALL 1
36.Os BSD 4.2
37.Sh NAME
38.Nm install
39.Nd install binaries
40.Sh SYNOPSIS
41.Nm install
42.Op Fl cs
43.Op Fl f Ar flags
44.Op Fl g Ar group
45.Op Fl m Ar mode
46.Op Fl o Ar owner
47.Ar file1 file2
48.Nm install
49.Op Fl cs
50.Op Fl f Ar flags
51.Op Fl g Ar group
52.Op Fl m Ar mode
53.Op Fl o Ar owner
54.Ar file1
55\&...
56.Ar fileN directory
57.Sh DESCRIPTION
58The file(s) are moved (or copied if the
59.Fl c
60option is specified) to the target file or directory.
61If the destination is a directory, then the
62.Ar file
63is moved into
64.Ar directory
65with its original filename.
66If the target file already exists, it is overwritten if permissions
67allow.
68.Pp
69.Bl -tag -width Ds
70.It Fl c
71Copy the file.
72This flag turns off the default behavior of
73.Nm install
74where it deletes the original file after creating the target.
75.It Fl f
76Specify the target's file flags.
77(See
78.Xr chflags 1
79for a list of possible flags and their meanings.)
80.It Fl g
81Specify a group.
82.It Fl m
83Specify an alternate mode.
84The default mode is set to rwxr-xr-x (0755).
85The specified mode may be either an octal or symbolic value; see
86.Xr chmod  1
87for a description of possible mode values.
88.It Fl o
89Specify an owner.
90.It Fl s
91.Nm Install
92exec's the command
93.Xr strip  1
94to strip binaries so that install can be portable over a large
95number of systems and binary types.
96.El
97.Pp
98By default,
99.Nm install
100preserves all file flags, with the exception of the ``nodump'' flag.
101.Pp
102The
103.Nm install
104utility attempts to prevent moving a file onto itself.
105.Pp
106Installing
107.Pa /dev/null
108creates an empty file.
109.Pp
110Upon successful completion a value of 0 is returned.
111Otherwise, a value of 1 is returned.
112.Sh SEE ALSO
113.Xr chflags 1 ,
114.Xr chgrp 1 ,
115.Xr chmod 1 ,
116.Xr cp 1 ,
117.Xr mv 1 ,
118.Xr strip 1 ,
119.Xr chown 8
120.Sh HISTORY
121The
122.Nm install
123utility appeared in
124.Bx 4.2 .
125