D'oh. Solution: Prune /proc when doing a find -follow.
I refuse to consign the whole male sex to the nursery. I insist on
believing that some men are my equals.
-- Brigid Brophy
>Was it by any chance a find that followed symbolic links? Probably it
>hit the link deep in /proc that linked to its own working directory...
>back to the directory where the link was!
>D'oh. Solution: Prune /proc when doing a find -follow.
: How would I get a command like 'touch' to recurse through a dir
: tree. For example. If a had the dir structure:
: I would like to issue the touch command in the Linux directory
: and have it perform touch on every file, in every dir within the Linux
: directory. Is this possible?
Check out the man pages of find(1) and xargs(1). For example:
find your_dir -type f -name '*.c' | xargs touch
The FIND can be used to print the names of all kinds of files (in
the example, plain files that have names ending in ".c", the
XARGS will run the TOUCH command on all filenames it can read from
stdin. This combination can be used to make *any* command work
on any set of (tree-structured or not) files. Consider also:
xargs some-command < /tmp/some_file
this will apply some-command to all files mentioned in "some_file",
no matter how you obtained the names.
Hope this helps,
Ruurd Beerstra, CMG-IT, Netherlands. | #include <stddisclaimer.h>