INSTALL(1) | General Commands Manual | INSTALL(1) |
install
— install
binaries
install |
[-bcprsUv ] [-a
command] [-B
suffix] [-D
destdir] [-f
flags] [-g
group] [-h
hash] [-l
linkflags] [-M
metalog] [-m
mode] [-N
dbdir] [-o
owner] [-S
stripflag] [-T
tags] file1 file2 |
install |
[-bcprsU ] [-a
command] [-B
suffix] [-D
destdir] [-f
flags] [-g
group] [-h
hash] [-l
linkflags] [-M
metalog] [-m
mode] [-N
dbdir] [-o
owner] [-S
stripflag] [-T
tags] file1 ...
fileN directory |
install |
-d [-pU ]
[-a command]
[-D destdir]
[-g group]
[-M metalog]
[-m mode]
[-N dbdir]
[-o owner]
[-T tags]
directory ... |
The file(s) are copied (or linked if the
-l
option is specified) to the target file or
directory. If the destination is a directory, then the
file is copied into directory
with its original filename. If the target file already exists, it is either
renamed to file.old if the -b
option is given or overwritten if permissions allow; an alternate backup
suffix may be specified via the -B
option's
argument.
-a
command-s
), but before ownership, permissions
or timestamps are set and before renaming (-r
)
occurs. command is invoked via the
sh(1) shell, allowing a single
-a
argument be to specified to
install
which the shell can then tokenize.-B
suffix-b
is given. If suffix
contains a '%' sign, a numbered backup will be performed, and the
%-pattern will be expanded using
sprintf(3), given an
integer counter as the backup number. The counter used starts from 0, and
the first available name resulting from the expansion is used.-b
-B
for specifying a different backup suffix.-c
-D
destdirDESTDIR
(top of the file hierarchy)
that the items are installed in to. If -M
metalog is in use, a leading string of
“destdir” will be removed from the
file names logged to the metalog. This option does
not affect where the actual files are installed.-d
-f
flags-g
group-h
hash-M
metalog. Supported digests:
-l
linkflags-M
metalog-m
mode-N
dbdir-o
owner-p
-r
-S
stripflagsinstall
passes stripflags as
option arguments to strip(1).
When -S
is used,
strip(1) is invoked via the
sh(1) shell, allowing a single
-S
argument be to specified to
install
which the shell can then tokenize.
Normally, install
invokes
strip(1) directly. This flag
implies -s
.-s
install
exec's the command
strip(1) to strip binaries so
that install can be portable over a large number of systems and binary
types. If the environment variable STRIP
is set,
it is used as the strip(1)
program.-T
tags-M
metalog.-U
-M
metalog.-v
install
to be verbose, showing files as they
are installed or backed up.By default, install
preserves all file
flags, with the exception of the ``nodump'' flag.
The install
utility attempts to prevent
copying a file onto itself.
Installing /dev/null creates an empty file.
STRIP
-s
option is used. If unspecified,
/usr/bin/strip is used.The install
utility exits 0 on
success, and >0 if an error occurs.
chflags(1), chgrp(1), chmod(1), cp(1), mv(1), strip(1), chown(8), mtree(8)
The install
utility appeared in
4.2BSD.
May 9, 2024 | NetBSD 10.99 |