1install(1M) System Administration Commands install(1M)
2
3
4
6 install - install commands
7
9 /usr/sbin/install -c dira [-m mode] [-u user] [-g group]
10 [-o] [-s] file
11
12
13 /usr/sbin/install -f dirb [-m mode] [-u user] [-g group]
14 [-o] [-s] file
15
16
17 /usr/sbin/install -n dirc [-m mode] [-u user] [-g group]
18 [-o] [-s] file
19
20
21 /usr/sbin/install -d | -i [-m mode] [-u user] [-g group]
22 [-o] [-s] dirx...
23
24
25 /usr/sbin/install [-m mode] [-u user] [-g group] [-o] [-s] file
26 [dirx]...
27
28
30 install is most commonly used in ``makefiles'' (see make(1S)) to
31 install a file in specific locations, or to create directories within a
32 file system. Each file is installed by copying it into the appropriate
33 directory.
34
35
36 install uses no special privileges to copy files from one place to
37 another. The implications of this are:
38
39 o You must have permission to read the files to be installed.
40
41 o You must have permission to copy into the destination direc‐
42 tory.
43
44 o You must have permission to change the modes on the final
45 copy of the file if you want to use the -m option.
46
47 o You must be super-user if you want to specify the ownership
48 of the installed file with the -u or -g options. If you are
49 not the super-user, the installed file is owned by you,
50 regardless of who owns the original.
51
52
53 Note that if the ROOT environment variable is set, each of the default
54 directory paths are prefixed by its value (for example, $ROOT/bin and
55 so on).
56
57
58 install prints messages telling the user exactly what files it is
59 replacing or creating and where they are going.
60
61
62 If no options or directories (dirx ...) are given, install searches a
63 set of default directories ( /bin, /usr/bin, /etc, /lib, and /usr/lib,
64 in that order) for a file with the same name as file. When the first
65 occurrence is found, install issues a message saying that it is over‐
66 writing that file with file, and proceeds to do so. If the file is not
67 found, the program states this and exits.
68
69
70 If one or more directories (dirx ...) are specified after file, those
71 directories are searched before the default directories.
72
73
74 This version of install (/usr/sbin/install) is not compatible with the
75 install binaries in many versions of Unix other than Solaris. For a
76 higher degree of compatibility with other Unix versions, use
77 /usr/ucb/install, which is described in the install(1B) man page.
78
80 The following options are supported:
81
82 -c dira Install file in the directory specified by dira, if file
83 does not yet exist. If it is found, install issues a mes‐
84 sage saying that the file already exists, and exits without
85 overwriting it.
86
87
88 -f dirb Force file to be installed in given directory, even if the
89 file already exists. If the file being installed does not
90 already exist, the mode and owner of the new file is set to
91 755 and bin , respectively. If the file already exists, the
92 mode and owner is that of the already existing file.
93
94
95 -n dirc If file is not found in any of the searched directories, it
96 is put in the directory specified in dirc. The mode and
97 owner of the new file is set to 755 and bin, respectively.
98
99
100 -d Create a directory. Missing parent directories are created
101 as required as in mkdir -p. If the directory already
102 exists, the owner, group and mode is set to the values
103 given on the command line.
104
105
106 -i Ignore default directory list, searching only through the
107 given directories (dirx ...).
108
109
110 -m mode The mode of the new file is set to mode. Set to 0755 by
111 default.
112
113
114 -u user The owner of the new file is set to user. Only available to
115 the super-user. Set to bin by default.
116
117
118 -g group The group id of the new file is set to group. Only avail‐
119 able to the super-user. Set to bin by default.
120
121
122 -o If file is found, save the ``found'' file by copying it to
123 OLDfile in the directory in which it was found. This option
124 is useful when installing a frequently used file such as
125 /bin/sh or /lib/saf/ttymon, where the existing file cannot
126 be removed.
127
128
129 -s Suppress printing of messages other than error messages.
130
131
133 See largefile(5) for the description of the behavior of install when
134 encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
135
137 See attributes(5) for descriptions of the following attributes:
138
139
140
141
142 ┌─────────────────────────────┬─────────────────────────────┐
143 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
144 ├─────────────────────────────┼─────────────────────────────┤
145 │Availability │SUNWcsu │
146 └─────────────────────────────┴─────────────────────────────┘
147
149 chgrp(1), chmod(1), chown(1), cp(1), install(1B), make(1S), mkdir(1),
150 attributes(5), largefile(5)
151
152
153
154SunOS 5.11 3 Nov 2005 install(1M)