install.1x (2405B)
- .\" This file is part of Cross Unix Documentation
- .\" Copyright © 2019-2020 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
- .\" SPDX-License-Identifier: CC-BY-4.0
- .Dd 2019-11-16
- .Dt INSTALL 1x
- .Os
- .Sh PROLOG
- This manual page is part of
- .Lk https://hacktivis.me/git/cross-unix-documentation "Cross-Unix Documentation"
- which is an attempt to provide documentation of similarities and (noteworthy) differencies between Unix-like systems.
- To be used as an addition to the POSIX standard.
- .Sh NAME
- .Nm install
- .Nd install binairies
- .Sh SYNOPSIS
- .Ss BusyBox, GNU coreutils, OpenBSD
- .Nm
- .Op Fl bcDsp
- .Op Fl g Ar group
- .Op Fl m Ar mode
- .Op Fl o Ar owner
- .Op Ar source
- .Op Ar destination
- .Ss NetBSD, FreeBSD
- .Nm
- .Op Fl bcsp
- .Op Fl g Ar group
- .Op Fl m Ar mode
- .Op Fl o Ar owner
- .Op Fl D Ar destdir
- .Op Ar source
- .Op Ar destination
- .Sh DESCRIPTION
- .Nm
- copies
- .Ar source
- to
- .Ar destination ,
- if
- .Ar destination
- already exists it is removed or renamed if
- .Fl b
- is specified before source is copied.
- If destination is a directory then source is copied into destination with its original filename.
- The mode of
- .Ar destination
- is set to 755 unless
- .Fl m Ar mode
- is specified.
- .Bl -tag -width Ds
- .It Fl b
- backup any existing files before overwriting them by renaming them.
- (GNU appends '~' by default,
- BSDs
- appends .old by default)
- .It Fl c
- Copy the file.
- .Bx 4.2
- default behaviour is to move the binary unless
- .Fl c
- is specified.
- Copying the file is now the default behaviour; the flag is maintained for backwards compatibility only.
- .It Fl D
- BusyBox, suckless sbase, GNU coreutils,
- .Ox :
- Create any missing directories for
- .Ar destination
- (which still points to a file).
- .It Fl D Ar destdir
- .Nx ,
- .Fx :
- Sets the DESTDIR (top of the file hierarchy) that the items are installed in to.
- .It Fl g Ar group
- Sets group ownership.
- GNU: instead of the process' current group
- .It Fl m Ar mode
- Sets alternative mode.
- The default mode is set to rwr-xr-x(0755).
- .It Fl o Ar owner
- Sets user ownership.
- .It Fl p
- Preserve file access and modification times.
- .It Fl s
- executes
- .Xr strip 1
- on each binary/file
- .El
- .Pp
- There are many extra flags in GNU/*BSD versions of
- .Xr install 1
- but this is kept to the common ones.
- .Sh SOURCE
- .Nx 8.1 ,
- .Fx 12.1 ,
- .Ox 6.6 ,
- GNU coreutils 8.30, Busybox 1.30.1,
- .Bx 4.2 .
- .Sh HISTORY
- The
- .Nm
- utility appeared in
- .Bx 4.2 .
- .Sh AUTHORS
- .An Haelwenn (lanodan) Monnier Aq Mt contact+c-u-d@hacktivis.me