Here's what I'm trying to do
find . -maxdepth 1 -type d -print0 | xargs -0 -P4 find -name 'war' -type d
I would like to create a list of directory names, null-terminated, and then pass this list to xargs, which for each directory name calls find using a pool of 4 processes.
My problem is: How do I access stdin in the piped-to find command? Something like
find <STDIN> -name 'war' -type d
-I SOME_SYMBOLS
parameter forxargs
to constructfind SOME_SYMBOLS -name ...
but you can do what you want by 1find
command only.