On 6/15/06, The Wanderer <[EMAIL PROTECTED]> wrote:
For the little it's worth, I also find myself wanting to do something
like this from time to time, usually in a context in which find is not a
satisfactory alternative - or, at best, in which it would be awkward and
potentially difficult to construct a find command which would match all
of the desired files and no others. (For that matter, I've just scoured
the man page to find, and I do not see an option to make it print the
absolute path to the file rather than the path relative to the directory
from which find was invoked.)

For the record, suppose the list of things you wish to search is in
the shell variable dirlist.   You can then do it like this:

$ dirlist="foo bar baz"
$ find $( for dir in $dirlist; do ( cd $dir && pwd ) ; done )    -print
/tmp/foo
/tmp/foo/29452
/tmp/foo/10849
/tmp/foo/7165
/tmp/bar
/tmp/bar/19148
/tmp/bar/2729
/tmp/bar/32714
/tmp/baz
/tmp/baz/25967
/tmp/baz/13157
/tmp/baz/30767


_______________________________________________
Bug-findutils mailing list
Bug-findutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-findutils

Reply via email to