xref: /original-bsd/usr.bin/xinstall/install.1 (revision f1d75c93)
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.14 (Berkeley) 03/03/93
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 f Ar flags
18.Op Fl g Ar group
19.Op Fl m Ar mode
20.Op Fl o Ar owner
21.Ar file1 file2
22.Nm install
23.Op Fl cs
24.Op Fl f Ar flags
25.Op Fl g Ar group
26.Op Fl m Ar mode
27.Op Fl o Ar owner
28.Ar file1
29\&...
30.Ar fileN directory
31.Sh DESCRIPTION
32The file(s) are moved (or copied if the
33.Fl c
34option is specified) to the target file or directory.
35If the destination is a directory, then the
36.Ar file
37is moved into
38.Ar directory
39with its original filename.
40If the target file already exists, it is overwritten if permissions
41allow.
42.Pp
43.Bl -tag -width Ds
44.It Fl c
45Copy the file.
46This flag turns off the default behavior of
47.Nm install
48where it deletes the original file after creating the target.
49.It Fl f
50Specify the target's file flags.
51(See
52.Xr chflags 1
53for a list of possible flags and their meanings.)
54.It Fl g
55Specify a group.
56.It Fl m
57Specify an alternate mode.
58The default mode is set to rwxr-xr-x (0755).
59The specified mode may be either an octal or symbolic value; see
60.Xr chmod  1
61for a description of possible mode values.
62.It Fl o
63Specify an owner.
64.It Fl s
65.Nm Install
66exec's the command
67.Xr strip  1
68to strip binaries so that install can be portable over a large
69number of systems and binary types.
70.El
71.Pp
72By default,
73.Nm install
74preserves all file flags, with the exception of the ``nodump'' flag.
75.Pp
76The
77.Nm install
78utility attempts to prevent moving a file onto itself.
79.Pp
80Installing
81.Pa /dev/null
82creates an empty file.
83.Pp
84Upon successful completion a value of 0 is returned.
85Otherwise, a value of 1 is returned.
86.Sh SEE ALSO
87.Xr chflags 1 ,
88.Xr chgrp 1 ,
89.Xr chmod 1 ,
90.Xr cp 1 ,
91.Xr mv 1 ,
92.Xr strip 1 ,
93.Xr chown 8
94.Sh HISTORY
95The
96.Nm install
97utility appeared in
98.Bx 4.2 .
99