install —
install binaries
  
    | install | [ -bcprsU] [-acommand] [-Bsuffix] [-Ddestdir] [-fflags] [-ggroup] [-hhash] [-llinkflags] [-Mmetalog] [-mmode] [-Ndbdir] [-oowner] [-Sstripflag] [-Ttags] file1 file2 | 
  
    | install | [ -bcprsU] [-acommand] [-Bsuffix] [-Ddestdir] [-fflags] [-ggroup] [-hhash] [-llinkflags] [-Mmetalog] [-mmode] [-Ndbdir] [-oowner] [-Sstripflag] [-Ttags] file1 ...
      fileN directory | 
  
    | install | -d[-pU]
      [-acommand]
      [-Ddestdir]
      [-ggroup]
      [-Mmetalog]
      [-mmode]
      [-Ndbdir]
      [-oowner]
      [-Ttags]
      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.
  - -acommand
- Run command on the target after installation and
      stripping (-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-aargument be to specified toinstallwhich the shell can then tokenize.
- -Bsuffix
- Use suffix as the backup suffix if
      -bis 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
- Backup any existing files before overwriting them by renaming them to
      file.old. See
      -Bfor specifying a different backup suffix.
- -c
- Copy the file. This is the default behavior; the flag is maintained for
      backwards compatibility only.
- -Ddestdir
- Specify the DESTDIR(top of the file hierarchy)
      that the items are installed in to. If-Mmetalog 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
- Create directories. Missing parent directories are created as
    required.
- -fflags
- Specify the target's file flags. (See
      chflags(1) for a list of
      possible flags and their meanings.)
- -ggroup
- Specify a group.
- -hhash
- When copying, calculate the digest of the files with
      hash to store in the -Mmetalog. Supported digests:
    
      - none
- No hash. This is the default.
- md5
- The MD5 cryptographic message digest.
- rmd160
- The RMD-160 cryptographic message digest.
- sha1
- The SHA-1 cryptographic message digest.
- sha256
- The 256-bits SHA-2 cryptographic message digest of the file.
- sha384
- The 384-bits SHA-2 cryptographic message digest of the file.
- sha512
- The 512-bits SHA-2 cryptographic message digest of the file.
 
 
- -llinkflags
- Instead of copying the file make a link to the source. The type of the
      link is determined by the linkflags argument. Valid
      linkflags are: a (absolute),
      r (relative), h (hard),
      s (symbolic), m (mixed).
      Absolute and relative have effect only for symbolic links. Mixed links are
      hard links for files on the same filesystem, symbolic otherwise.
- -Mmetalog
- Write the metadata associated with each item installed to
      metalog in an
      mtree(8) “full
      path” specification line. The metadata includes: the file name and
      file type, and depending upon other options, the owner, group, file flags,
      modification time, and tags.
- -mmode
- Specify an alternative mode. 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.
- -Ndbdir
- Use the user database text file master.passwd and
      group database text file group from
      dbdir, rather than using the results from the
      system's getpwnam(3) and
      getgrnam(3) (and related)
      library calls.
- -oowner
- Specify an owner.
- -p
- Preserve the source files access and modification times.
- -r
- Install to a temporary file and then rename the file to its final
      destination name. This can be used for precious files, to avoid truncation
      of the original when error conditions (filesystem full etc.) occur.
- -Sstripflags
- installpasses stripflags as
      option arguments to strip(1).
      When- -Sis used,
      strip(1) is invoked via the
      sh(1) shell, allowing a single- -Sargument be to specified to- installwhich the shell can then tokenize.
      Normally,- installinvokes
      strip(1) directly. This flag
      implies- -s.
- -s
- installexec'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- STRIPis set,
      it is used as the strip(1)
      program.
- -Ttags
- Specify the mtree(8) tags to
      write out for the file when using -Mmetalog.
- -U
- Indicate that install is running unprivileged, and that it should not try
      to change the owner, the group, or the file flags of the destination. The
      information that would have been updated can be stored in a log file with
      -Mmetalog.
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
- The program used to strip installed binaries when the
      -soption is used. If unspecified,
      /usr/bin/strip is used.
Theinstall utility exits 0 on success,
  and >0 if an error occurs.
The install utility appeared in
  4.2BSD.