descend - walk directory tree and execute a command at each node
walks down a directory tree and executes a command at each node. It
is not as versatile as
but it has a simpler syntax. If no
starts at the current one.
can be told to skip the special directories associated with RCS,
CVS, and SCCS. This makes
especially handy for use with these packages. It can be used with
other commands too, of course.
is a poor man's way to make any command recursive. Note:
does not follow symbolic links to directories unless they are
specified on the command line.
Descend into directories that begin with '.'.
Ignore errors during descent. Normally,
quits when an error occurs.
Suppress the message `In directory
that is normally printed during the descent.
Don't descend into the special directories
before executing it.
- descend ls
- Cheap substitute for `ls -R'.
- descend -f 'rm *' tree
- Strip `tree' of its leaves. This command descends the `tree'
directory, removing all regular files. Since
does not remove directories, this command leaves the directory
structure of `tree' intact, but denuded. The
option is required to keep
from quitting. You could use `rm -f' instead.
- descend -r 'co RCS/*' /project/src/
- Check out every RCS file under the directory
- descend -r 'cvs diff'
- Perform CVS `diff' operation on every directory below (and including)
the current one.
Returns 1 if errors occur (and the
option is not used). Otherwise returns 0.
Software Technology Group
John Fluke Mfg. Co., Inc.
Shell metacharacters in
may have bizarre effects. In particular, compound commands
(containing ';', '[', and ']' characters) will not work. It is best
to enclose complicated commands in single quotes .