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