OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / gnumaniak / original / man1 / install.1
1 .\" Copyright Andries Brouwer, A. Wik 1998, Ragnar Hojland Espinosa 1998-2002
2 .\"
3 .\" This file may be copied under the conditions described
4 .\" in the LDP GENERAL PUBLIC LICENSE, Version 1, September 1998
5 .\" that should have been distributed together with this file.
6 .\"
7 .TH INSTALL 1 "18 June 2002" "GNU fileutils 4.1"
8 .SH NAME
9 install \- copy files and set attributes
10 .SH SYNOPSIS
11 .B install
12 .BI [ options ]
13 .B [\-s] [\-\-strip]
14 .I source dest
15 .br
16 .B install
17 .BI [ options ]
18 .B [\-s] [\-\-strip]
19 .I source... directory
20 .br
21 .B install
22 .BI [ options ]
23 .B [\-d,\-\-directory]
24 .I directory...
25 .sp
26 Options (shortest form):
27 .br
28 .B [\-bcpvD]
29 .BI "[\-g " group ]
30 .BI "[\-m " mode ]
31 .BI "[\-o " owner ]
32 .BI "[\-S " suffix ]
33 .B [\-V {numbered,existing,simple}]
34 .B [\-\-preserve\-timestamps]
35 .BI [\-\-target\-directory= dir ]
36 .B [\-\-help] [\-\-version] [\-\-]
37 .SH DESCRIPTION
38 .B install
39 copies files while setting their permission modes and, if
40 possible, their owner and group.
41 .PP
42 In the first of these invocation forms, the
43 .I source
44 file is copied to the
45 .I dest
46 target file.  In the second, each of the
47 .I source
48 files are copied to the destination
49 .IR directory .
50 In the last, each
51 .I directory
52 (and any missing parent directories) is created.
53 .PP
54 .B install
55 is similar to
56 .BR cp ,
57 but allows you to control the attributes of destination files.
58 It is typically used in Makefiles to copy programs into their
59 destination directories.  It refuses to copy files onto themselves.
60 .PP
61 .SH OPTIONS
62 .TP
63 .B "\-c"
64 Ignored; for compatibility with old Unix versions of
65 .BR install .
66 .TP
67 .B "\-d, \-\-directory"
68 Create each given directory and any missing parent directories,
69 setting the owner, group and mode as given on the command line or
70 to the defaults.  It also gives any parent directories it creates
71 those attributes.
72 .TP
73 .BI "\-g " "group" ", \-\-group=" "group"
74 Set the group ownership of installed files or directories to
75 .IR group .
76 The default is the process's current group.
77 .I group
78 may be either a group name or a numeric group id.
79 .TP
80 .BI "\-m " "mode" ", \-\-mode=" "mode"
81 Set the permissions for the installed file or directory to
82 .IR mode ,
83 which can be either an octal number, or a symbolic mode as in
84 .BR chmod ,
85 with 0 as the point of departure. The default mode is 0755 - read,
86 write, and execute for the owner, and read and execute for group and other.
87 .TP
88 .BI "\-o " "owner" ", \-\-owner=" "owner"
89 If
90 .B install
91 has appropriate privileges (is run as root), set the ownership of
92 installed files or directories to
93 .IR owner .
94 The default is `root'.
95 .I owner
96 may be either a user name or a numeric user ID.
97 .TP
98 .B \-p, \-\-preserve\-timestamps
99 Set the time of last access and the time of last modification of
100 each installed file to match those of each corresponding original
101 file.
102
103 When a file is installed without this option, its last
104 access and last modification times are both set to the time of installation.
105 This option is useful if you want to use the last modification times of
106 installed files to keep track of when they were last built as opposed to
107 when they were last installed.         
108 .TP
109 .B "\-s, \-\-strip"
110 Strip the symbol tables from installed binary executables.
111 .TP
112 .BI "\-\-target\-directory=" dir
113 Specify the the target directory with an option instead of as the last arg
114 in the command line.  This is useful with \fBxargs(1)\fR.
115 .TP
116 .B \-D
117 Create all leading components of \fIdest\fR except the last,
118 then copy \fIsource\fR to \fIdest\fR; useful in the 1st format.
119 .TP
120 .B \-v, \-\-verbose
121 Print the name of each file before installing it.
122 .SH "GNU BACKUP OPTIONS"
123 The GNU versions of programs like
124 .BR cp ,
125 .BR mv ,
126 .BR ln ,
127 .B install
128 and
129 .B patch 
130 will make a backup of files about to be overwritten, changed or destroyed
131 if that is desired. That backup files are desired is indicated by
132 the \-b option. How they should be named is specified by the \-\-backup option.
133 In case the name of the backup file is given by the name of the file
134 extended by a suffix, this suffix is specified by the \-S option.
135 .TP
136 .BI "\-b, \-\-backup[=" method ]
137 Make backups of files that are about to be overwritten or removed.  Note
138 that \fB\-b\fR does not take args.
139 .TP
140 .BI "\-S " suffix ", \-\-suffix=" suffix
141 Append
142 .I SUFFIX
143 to each backup file made.
144 If this option is not specified, the value of the
145 .B SIMPLE_BACKUP_SUFFIX
146 environment variable is used.  And if
147 .B SIMPLE_BACKUP_SUFFIX
148 is not set, the default is `~'.
149 .TP
150 .BI "\-V " method ", \-\-version\-control=" method
151 .RS
152 Specify how backup files are named. The
153 .I method
154 argument can be `numbered' (or `t'), `existing' (or `nil'), or `never' (or
155 `simple').
156 If this option is not specified, the value of the
157 .B VERSION_CONTROL
158 environment variable is used.  And if
159 .B VERSION_CONTROL
160 is not set, the default backup type is `existing'.
161 .PP
162 This option corresponds to the Emacs variable `version-control'.
163 The valid
164 .IR method s
165 are (unique abbreviations are accepted):
166 .TP
167 .BR t ", " numbered
168 Always make numbered backups.
169 .TP
170 .BR nil ", " existing
171 Make numbered backups of files that already have them, simple
172 backups of the others.
173 .TP
174 .BR never ", " simple
175 Always make simple backups.
176 .RE
177 This option is deprecated, use \fB\-\-backup=\fImethod\fR instead.
178 .SH "GNU STANDARD OPTIONS"
179 .TP
180 .B "\-\-help"
181 Print a usage message on standard output and exit successfully.
182 .TP
183 .B "\-\-version"
184 Print version information on standard output, then exit successfully.
185 .TP
186 .B "\-\-"
187 Terminate option list.
188 .SH ENVIRONMENT
189 The variables LANG, LC_ALL, LC_CTYPE and LC_MESSAGES have the
190 usual meaning. For the GNU version, the variables SIMPLE_BACKUP_SUFFIX
191 and VERSION_CONTROL control backup file naming, as described above.
192 .SH "CONFORMING TO"
193 BSD 4.2 (which had the \-c, \-m, \-o, \-g and \-s options).
194 .SH NOTES
195 This page describes
196 .B install
197 as found in the fileutils-4.1 package;
198 other versions may differ slightly. Mail corrections and additions to
199 aeb@cwi.nl and aw@mail1.bet1.puv.fi and ragnar@ragnar-hojland.com
200 Report bugs in the program to bug-fileutils@gnu.org.