| 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 for a
single -a argument that 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
stripflags-S is used,
strip(1) is invoked via the
sh(1) shell, allowing for a
single -S argument that the shell can then
tokenize. Normally, install invokes
strip(1) directly. This flag
implies -s.-sSTRIP is set, it is used as the
strip(1) program.-T
tags-M
metalog.-U-M metalog.-vinstall 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.
| November 29, 2025 | NetBSD 11.99 |