<div id="Recursive-behavior"></div>
<div class="header">
<p>
Next: [[cvs: Adding, removing, and renaming files and directories#Adding, removing, and renaming files and directories|Adding and removing]], Previous: [[cvs: Branching and merging#Branching and merging|Branching and merging]], Up: [[cvs#Top|Top]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>
<div id="Recursive-behavior-1"></div>
== Recursive behavior ==
<div id="index-Recursive-_0028directory-descending_0029"></div>
<div id="index-Directory_002c-descending"></div>
<div id="index-Descending-directories"></div>
<div id="index-Subdirectories"></div>

Almost all of the subcommands of <small>CVS</small> work
recursively when you specify a directory as an
argument.  For instance, consider this directory
structure:

<div class="example" style="margin-left: 3.2em">
       <code>$HOME</code>
         |
         +--<tt>tc</tt>
         |   |
             +--<tt>CVS</tt>
             |      (internal CVS files)
             +--<tt>Makefile</tt>
             +--<tt>backend.c</tt>
             +--<tt>driver.c</tt>
             +--<tt>frontend.c</tt>
             +--<tt>parser.c</tt>
             +--<tt>man</tt>
             |    |
             |    +--<tt>CVS</tt>
             |    |  (internal CVS files)
             |    +--<tt>tc.1</tt>
             |
             +--<tt>testing</tt>
                  |
                  +--<tt>CVS</tt>
                  |  (internal CVS files)
                  +--<tt>testpgm.t</tt>
                  +--<tt>test2.t</tt>
</div>

If &lsquo;<tt>tc</tt>&rsquo; is the current working directory, the
following is true:


* &lsquo;<code>cvs update testing</code>&rsquo; is equivalent to

<div class="example" style="margin-left: 3.2em">
 cvs update testing/testpgm.t testing/test2.t
</div>


* &lsquo;<code>cvs update testing man</code>&rsquo; updates all files in the subdirectories


* &lsquo;<code>cvs update .</code>&rsquo; or just &lsquo;<code>cvs update</code>&rsquo; updates all files in the <code>tc</code> directory

If no arguments are given to <code>update</code> it will
update all files in the current working directory and
all its subdirectories.  In other words, &lsquo;<tt>.</tt>&rsquo; is a
default argument to <code>update</code>.  This is also true
for most of the <small>CVS</small> subcommands, not only the
<code>update</code> command.

The recursive behavior of the <small>CVS</small> subcommands can be
turned off with the &lsquo;<code>-l</code>&rsquo; option.
Conversely, the &lsquo;<code>-R</code>&rsquo; option can be used to force recursion if
&lsquo;<code>-l</code>&rsquo; is specified in &lsquo;<tt>~/.cvsrc</tt>&rsquo; (see [[cvs: Guide to CVS commands#Default options and the ~/.cvsrc file|~/.cvsrc]]).

<div class="example" style="margin-left: 3.2em">
 $ cvs update -l         # <span class="roman" style="font-family:serif; font-weight:normal">Don't update files in subdirectories</span>
</div>


----

<div class="header">
<p>
Next: [[cvs: Adding, removing, and renaming files and directories#Adding, removing, and renaming files and directories|Adding and removing]], Previous: [[cvs: Branching and merging#Branching and merging|Branching and merging]], Up: [[cvs#Top|Top]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>
This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
