NAME
install - install files and directories
SYNOPSIS
install [-CcDps] [-g group] [-m mode] [-o owner] file1 file2
install [-CcDps] [-g group] [-m mode] [-o owner] file ... directory
install -d [-g group] [-m mode] [-o owner] directory ...
DESCRIPTION
install copies files to the target path specified by file2 or directory. Alternatively, if -d is specified, install creates directories (also creating missing parent directories as necessary, similar to mkdir -p).
install accepts these options:
- -C
-
Copy the file only if it differs from the target (according to cmp).
- -c
-
Copy the file. This option is provided for compatibility and is the default.
- -D
-
Give debugging information. If specified once, install will warn about impending copies or moves. If specified more than once, install will warn when it does not install files due to -C.
- -d
-
Create directories (creating missing parent directories as needed, similar to mkdir -p). When creating parent directories, the implied directories are created with the default creation mask 0755 (modified by your umask). Only those directories explicitly provided on the command line take the permissions specified by -m. This behavior imitates that of BSD install(1).
- -f
-
Specify the target's file flags, i.e. -f flags. This option is only provided for compatibility and does not affect the execution of install.
- -g
-
Specify the group to which the target file should belong. Both numeric and mnemonic group IDs are acceptable.
- -m MODE
-
Specify the target file's mode. Either octal modes or symbolic modes are acceptable. See the documentation for the PerlPowerTools::SymbolicMode module for details on acceptable symbolic modes. The default mode (used in absence of -m is 0755). When specifying a symbolic mode, keep in mind that all directories are created with the default creation mask 0755 (as modified by your umask), so it is probably best to use absolute symbolic permissions (e.g.
u=rwx,g=rx,o=rx
) as opposed to relative symbolic permissions (e.g.ugo+x
). - -o
-
Specify the owner to whom the target should belong. Both numeric and mnemonic user IDs are acceptable.
- -p
-
Preserve modification time. This option implies -C.
- -s
-
Invoke strip(1) on installed binaries.
ENVIRONMENT
No environment variables affect the execution of install.
CAVEATS
The combination of creation of and setting permissions for files and directories is not atomic, so there are lots of possibilities for race conditions. If you are really concerned about this, use a umask of 77.
AUTHOR
The Perl implementation of install was written by Greg Bacon <gbacon@itsc.uah.edu> as part of the ADaM Project.
COPYRIGHT and LICENSE
Copyright 1999 UAH Information Technology and Systems Center.
This program is free and open software. You may use, copy, modify, distribute, and sell this program (and any modified variants) in any way you wish, provided you do not restrict others from doing the same.
SEE ALSO
umask(2), chmod(1), mkdir(1), chown(8), chgrp(8), strip(1)