xref: /original-bsd/usr.bin/xinstall/install.1 (revision 13deef58)
1.\" Copyright (c) 1987, 1990 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.roff%
5.\"
6.\"     @(#)install.1	6.13 (Berkeley) 06/29/92
7.\"
8.Dd
9.Dt INSTALL 1
10.Os BSD 4.2
11.Sh NAME
12.Nm install
13.Nd install binaries
14.Sh SYNOPSIS
15.Nm install
16.Op Fl cs
17.Op Fl m Ar mode
18.Op Fl o Ar owner
19.Op Fl g Ar group
20.Ar file1 file2
21.Nm install
22.Op Fl cs
23.Op Fl m Ar mode
24.Op Fl o Ar owner
25.Op Fl g Ar group
26.Ar file1
27\&...
28.Ar fileN directory
29.Sh DESCRIPTION
30The file(s) are moved (or copied if the
31.Fl c
32option is specified) to the target file or directory.
33If the destination is a directory, then the
34.Ar file
35is moved into
36.Ar directory
37with its original filename.
38If the target file already exists, it is overwritten if permissions
39allow.
40.Pp
41.Bl -tag -width Ds
42.It Fl m
43Specify an alternate mode.
44The default mode is set to 755 (rwxr-xr-x).
45The specified mode may be either an octal or symbolic value; see
46.Xr chmod  1
47for a description of possible mode values.
48.It Fl o
49Specify an owner.
50.It Fl g
51Specify a group.
52.It Fl s
53.Nm Install
54exec's the command
55.Xr strip  1
56to strip binaries so that install can be portable over a large
57number of systems and binary types.
58.El
59.Pp
60The
61.Nm install
62utility attempts to prevent moving a file onto itself.
63.Pp
64The
65.Nm install
66utility always attempts to preserve the file flags with the exception
67of the NODUMP flag which is always turned off.
68.Pp
69Installing
70.Pa /dev/null
71creates an empty file.
72.Pp
73Upon successful completion a value of 0 is returned.
74Otherwise, a value of 1 is returned.
75.Sh SEE ALSO
76.Xr chflags 1 ,
77.Xr chgrp 1 ,
78.Xr chmod 1 ,
79.Xr cp 1 ,
80.Xr mv 1 ,
81.Xr strip 1 ,
82.Xr chown 8
83.Sh HISTORY
84The
85.Nm install
86utility appeared in
87.Bx 4.2 .
88