INSTALL(1)                 OpenBSD Reference Manual                 INSTALL(1)

NNAAMMEE
     iinnssttaallll - install binaries

SSYYNNOOPPSSIISS
     iinnssttaallll [--bbCCccddppSSss] [--BB _s_u_f_f_i_x] [--ff _f_l_a_g_s] [--gg _g_r_o_u_p] [--mm _m_o_d_e] [--oo _o_w_n_e_r]
             _s_o_u_r_c_e [_._._.] _t_a_r_g_e_t [_._._.]

DDEESSCCRRIIPPTTIIOONN
     The _s_o_u_r_c_e file(s) are copied to the _t_a_r_g_e_t file or directory.  If the
     _t_a_r_g_e_t file already exists, it is either renamed to _f_i_l_e_._o_l_d if the --bb
     option is given or overwritten if permissions allow.  An alternate backup
     suffix may be specified via the --BB option's argument.  If the --dd option
     is given, _t_a_r_g_e_t directories are created, and no files are copied.

     The options are as follows:

     --BB _s_u_f_f_i_x  Use _s_u_f_f_i_x as the backup suffix if --bb is given.

     --bb         Backup any existing files before overwriting them by renaming
                them to _f_i_l_e_._o_l_d.  See --BB for specifying a different backup
                suffix.

     --CC         Copy the file.  If the target file already exists and the
                files are the same, then don't change the modification time of
                the target.

     --cc         Copy the file.  This is actually the default.  The --cc option
                is only included for backwards compatibility.

     --dd         Create directories.  Missing parent directories are created as
                required.  This option cannot be used with the --BB, --bb, --CC, --cc,
                --ff, --pp, --SS, or --ss options.

     --ff _f_l_a_g_s   Specify the target's file _f_l_a_g_s.  (See chflags(1) for a list
                of possible flags and their meanings.)

     --gg _g_r_o_u_p   Specify a _g_r_o_u_p.  A numeric GID is allowed.

     --mm _m_o_d_e    Specify an alternate _m_o_d_e.  The default mode is set to rwxr-
                xr-x (0755).  The specified mode may be either an octal or
                symbolic value; see chmod(1) for a description of possible
                mode values.

     --oo _o_w_n_e_r   Specify an _o_w_n_e_r.  A numeric UID is allowed.

     --pp         Preserve the modification time.  Copy the file, as if the --CC
                (compare and copy) option is specified, except if the target
                file doesn't already exist or is different, then preserve the
                modification time of the file.

     --SS         Safe copy.  Normally, iinnssttaallll unlinks an existing target be-
                fore installing the new file.  With the --SS flag a temporary
                file is used and then renamed to be the target.  The reason
                this is safer is that if the copy or rename fails, the exist-
                ing target is left untouched.

     --ss         iinnssttaallll exec's the command _/_u_s_r_/_b_i_n_/_s_t_r_i_p 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 instead.

     By default, iinnssttaallll preserves all file flags, with the exception of the
     ``nodump'' flag.

     The iinnssttaallll utility attempts to prevent moving a file onto itself.

     Installing _/_d_e_v_/_n_u_l_l creates an empty file.

     Upon successful completion a value of 0 is returned.  Otherwise, a value
     >0 is returned.

EENNVVIIRROONNMMEENNTT
     STRIP  For an alternate strip(1) program to run.  Default is
            _/_u_s_r_/_b_i_n_/_s_t_r_i_p.

FFIILLEESS
     INS@XXXXXXXXXX  If either --SS option is specified, or the --CC or --pp option
                     is used in conjunction with the --ss option, temporary
                     files named INS@XXXXXXXXXX, where XXXXXXXXXX is decided
                     by mkstemp(3), are created in the target directory.

SSEEEE AALLSSOO
     chflags(1), chgrp(1), chmod(1), cp(1), mv(1), strip(1), chown(8)

HHIISSTTOORRYY
     The iinnssttaallll utility appeared in 4.2BSD.

CCAAVVEEAATTSS
     The --CC, --pp, and --SS flags are non-standard and should not relied upon for
     portability.

     Temporary files may be left in the target directory if iinnssttaallll exits ab-
     normally.

OpenBSD 3.8                      June 6, 1993                                2
