Annotation of src/usr.bin/xinstall/install.1, Revision 1.2
1.2 ! deraadt 1: .\" $OpenBSD: install.1,v 1.4 1994/11/14 04:57:17 jtc Exp $
1.1 deraadt 2: .\" $NetBSD: install.1,v 1.4 1994/11/14 04:57:17 jtc Exp $
3: .\"
4: .\" Copyright (c) 1987, 1990, 1993
5: .\" The Regents of the University of California. All rights reserved.
6: .\"
7: .\" Redistribution and use in source and binary forms, with or without
8: .\" modification, are permitted provided that the following conditions
9: .\" are met:
10: .\" 1. Redistributions of source code must retain the above copyright
11: .\" notice, this list of conditions and the following disclaimer.
12: .\" 2. Redistributions in binary form must reproduce the above copyright
13: .\" notice, this list of conditions and the following disclaimer in the
14: .\" documentation and/or other materials provided with the distribution.
15: .\" 3. All advertising materials mentioning features or use of this software
16: .\" must display the following acknowledgement:
17: .\" This product includes software developed by the University of
18: .\" California, Berkeley and its contributors.
19: .\" 4. Neither the name of the University nor the names of its contributors
20: .\" may be used to endorse or promote products derived from this software
21: .\" without specific prior written permission.
22: .\"
23: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33: .\" SUCH DAMAGE.
34: .\"
35: .\" @(#)install.1 8.1 (Berkeley) 6/6/93
36: .\"
37: .Dd June 6, 1993
38: .Dt INSTALL 1
39: .Os BSD 4.2
40: .Sh NAME
41: .Nm install
42: .Nd install binaries
43: .Sh SYNOPSIS
44: .Nm install
45: .Op Fl cs
46: .Op Fl f Ar flags
47: .Op Fl g Ar group
48: .Op Fl m Ar mode
49: .Op Fl o Ar owner
50: .Ar file1 file2
51: .Nm install
52: .Op Fl cs
53: .Op Fl f Ar flags
54: .Op Fl g Ar group
55: .Op Fl m Ar mode
56: .Op Fl o Ar owner
57: .Ar file1
58: \&...
59: .Ar fileN directory
60: .Nm install
61: .Fl d
62: .Op Fl m Ar mode
63: .Op Fl o Ar owner
64: .Op Fl g Ar group
65: .Ar directory
66: \&...
67: .Sh DESCRIPTION
68: The file(s) are moved (or copied if the
69: .Fl c
70: option is specified) to the target file or directory.
71: If the destination is a directory, then the
72: .Ar file
73: is moved into
74: .Ar directory
75: with its original filename.
76: If the target file already exists, it is overwritten if permissions
77: allow.
78: .Pp
79: .Bl -tag -width Ds
80: .It Fl c
81: Copy the file.
82: This flag turns off the default behavior of
83: .Nm install
84: where it deletes the original file after creating the target.
85: .It Fl f
86: Specify the target's file flags.
87: (See
88: .Xr chflags 1
89: for a list of possible flags and their meanings.)
90: .It Fl g
91: Specify a group.
92: .It Fl m
93: Specify an alternate mode.
94: The default mode is set to rwxr-xr-x (0755).
95: The specified mode may be either an octal or symbolic value; see
96: .Xr chmod 1
97: for a description of possible mode values.
98: .It Fl o
99: Specify an owner.
100: .It Fl s
101: .Nm Install
102: exec's the command
103: .Xr strip 1
104: to strip binaries so that install can be portable over a large
105: number of systems and binary types.
106: .It Fl d
107: Create directories.
108: Missing parent directories are created as required.
109: .El
110: .Pp
111: By default,
112: .Nm install
113: preserves all file flags, with the exception of the ``nodump'' flag.
114: .Pp
115: The
116: .Nm install
117: utility attempts to prevent moving a file onto itself.
118: .Pp
119: Installing
120: .Pa /dev/null
121: creates an empty file.
122: .Pp
123: Upon successful completion a value of 0 is returned.
124: Otherwise, a value of 1 is returned.
125: .Sh SEE ALSO
126: .Xr chflags 1 ,
127: .Xr chgrp 1 ,
128: .Xr chmod 1 ,
129: .Xr cp 1 ,
130: .Xr mv 1 ,
131: .Xr strip 1 ,
132: .Xr chown 8
133: .Sh HISTORY
134: The
135: .Nm install
136: utility appeared in
137: .Bx 4.2 .