The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<html><head><title>install</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
</head>
<body class='pod'>
<!--
  generated by Pod::Simple::HTML v3.01,
  using Pod::Simple::PullParser v2.02,
  under Perl v5.008002 at Thu Aug  5 13:56:25 2004 GMT.

 If you want to change this HTML document, you probably shouldn't do that
   by changing it directly.  Instead, see about changing the calling options
   to Pod::Simple::HTML, and/or subclassing Pod::Simple::HTML,
   then reconverting this document from the Pod source.
   When in doubt, email the author of Pod::Simple::HTML for advice.
   See 'perldoc Pod::Simple::HTML' for more info.

-->

<!-- start doc -->
<a name='___top' class='dummyTopAnchor' ></a>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="NAME"
>NAME</a></h1>

<p><b>install</b> - install files and directories</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="SYNOPSIS"
>SYNOPSIS</a></h1>

<p><b>install</b> [<b>-CcDp</b>] [<b>-g</b> <i>group</i>] [<b>-m</b> <i>mode</i>] [<b>-o</b> <i>owner</i>] <i>file1</i> <i>file2</i></p>

<p><b>install</b> [<b>-CcDp</b>] [<b>-g</b> <i>group</i>] [<b>-m</b> <i>mode</i>] [<b>-o</b> <i>owner</i>] <i>file</i> ...
<i>directory</i></p>

<p><b>install</b> <b>-d</b> [<b>-g</b> <i>group</i>] [<b>-m</b> <i>mode</i>] [<b>-o</b> <i>owner</i>] <i>directory</i> ...</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="DESCRIPTION"
>DESCRIPTION</a></h1>

<p><b>install</b> moves (or copies if <b>-C</b> or <b>-c</b> are specified) files to the target path specified by <i>file2</i> or <i>directory</i>.
Alternatively,
if <b>-d</b> is specified,
<b>install</b> creates directories (also creating missing parent directories as necessary,
similar to <b>mkdir -p</b>).</p>

<p><b>install</b> accepts these options:</p>

<dl>
<dt><a name="-C"
><b>-C</b></a></dt><p class="pad"></p>

<dd>Copy the file only if it differs from the target (according to <b>cmp -s</b>).
This option implies <b>-c</b>.</dd><p class="pad"></p>

<dt><a name="-c"
><b>-c</b></a></dt><p class="pad"></p>

<dd>Copy the file instead of performing the default action of deleting the original.</dd><p class="pad"></p>

<dt><a name="-D"
><b>-D</b></a></dt><p class="pad"></p>

<dd>Give debugging information.
If specified once,
<b>install</b> will warn about impending copies or moves.
If specified more than once,
<b>install</b> will warn when it does not install files due to <b>-C</b>.</dd><p class="pad"></p>

<dt><a name="-d"
><b>-d</b></a></dt><p class="pad"></p>

<dd>Create directories (creating missing parent directories as needed,
similar to <b>mkdir -p</b>).
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 <b>-m</b>.
This behavior imitates that of BSD install(1).</dd><p class="pad"></p>

<dt><a name="-f"
><b>-f</b></a></dt><p class="pad"></p>

<dd>Specify the target&#39;s file flags,
i.e.
<b>-f</b> <i>flags</i>.
This option is only provided for compatibility and does not affect the execution of <b>install</b>.</dd><p class="pad"></p>

<dt><a name="-g"
><b>-g</b></a></dt><p class="pad"></p>

<dd>Specify the group to which the target file should belong.
Both numeric and mnemonic group IDs are acceptable.</dd><p class="pad"></p>

<dt><a name="-M"
><b>-M</b></a></dt><p class="pad"></p>

<dd>Do not use mmap(2).
This option is only provided for compatibility and does not affect the execution of <b>install</b>.</dd><p class="pad"></p>

<dt><a name="-m"
><b>-m</b></a></dt><p class="pad"></p>

<dd>Specify the target file&#39;s mode.
Either octal modes or symbolic modes are acceptable.
See the documentation for the <i>SymbolicMode</i> module for details on acceptable symbolic modes.
The default mode (used in absence of <b>-m</b> 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.
<code lang='und' xml:lang='und'>u=rwx,g=rx,o=rx</code>) as opposed to relative symbolic permissions (e.g.
<code lang='und' xml:lang='und'>ugo+x</code>).</dd><p class="pad"></p>

<dt><a name="-o"
><b>-o</b></a></dt><p class="pad"></p>

<dd>Specify the owner to whom the target should belong.
Both numeric and mnemonic user IDs are acceptable.</dd><p class="pad"></p>

<dt><a name="-p"
><b>-p</b></a></dt><p class="pad"></p>

<dd>Preserve modification time.
This option implies <b>-C</b>.</dd><p class="pad"></p>

<dt><a name="-s"
><b>-s</b></a></dt><p class="pad"></p>

<dd>Invoke strip(1) on installed binaries.</dd><p class="pad"></p>
</dl>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="ENVIRONMENT"
>ENVIRONMENT</a></h1>

<p>No environment variables affect the execution of <b>install</b>.</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="CAVEATS"
>CAVEATS</a></h1>

<p>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.</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="REVISION_HISTORY"
>REVISION HISTORY</a></h1>

<pre lang='und' xml:lang='und'>    $Log: install.gbacon.html,v $
<pre lang='und' xml:lang='und'>    Revision 1.3  2004/08/05 14:19:18  cwest
<pre lang='und' xml:lang='und'>    cleanup, new version number on website
<pre lang='und' xml:lang='und'>
    Revision 1.1  2004/07/23 20:10:07  cwest
    initial import

    Revision 1.14  1999/07/29 18:36:38  gbacon
    remove C&#60;use Data::Dumper&#62;

    Revision 1.13  1999/07/29 18:35:34  gbacon
    make -p imply -C as documented

    Revision 1.12  1999/07/29 15:41:18  gbacon
    must printf to use %o (in modify_file)!

    Revision 1.11  1999/07/29 15:36:20  gbacon
    beef up the docs!

    Revision 1.1  1999/07/27 15:49:47  gbacon
    added parens to File::Copy::{copy,move} calls
    fixed $opt{D} versus $Debug botch :-(

    Revision 1.0  1999/07/27 15:36:55  gbacon
    Initial revision</pre>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="AUTHOR"
>AUTHOR</a></h1>

<p>The Perl implementation of <b>install</b> was written by Greg Bacon &#60;<i>gbacon@itsc.uah.edu</i>&#62; as part of the ADaM Project.</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="COPYRIGHT_and_LICENSE"
>COPYRIGHT and LICENSE</a></h1>

<p>Copyright 1999 UAH Information Technology and Systems Center.</p>

<p>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.</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="SEE_ALSO"
>SEE ALSO</a></h1>

<p>umask(2), chmod(1), mkdir(1), chown(8), chgrp(8), strip(1)</p>

<!-- end doc -->

</body></html>