4 ms·
It seems like 90% of the uses for this can be taken care of with xargs: echo "file1 file2" | xargs -P 2 gzip
by Dobbs 16y ago
It seems like 90% of the uses for this can be taken care of with xargs:
echo "file1 file2" | xargs -P 2 gzip
- chrisaycock 16y agoAs I understand it, xargs only runs on the local machine; GNU parallel can run on remote machines as well. So parallel is the cluster-friendly version of xargs's -P.
- pixelbeat 16y agoYep. There also is dxargs which looks very useful http://www.semicomplete.com/blog/geekery/distributed-xargs.html http://www.semicomplete.com/blog/geekery/distributed-xargs.h...
- tange 16y agoPlease read http://www.gnu.org/software/parallel/man.html#differences_between_dxargs_and_gnu_parallel http://www.gnu.org/software/parallel/man.html#differences_be... before selecting dxargs.
- CJefferson 16y agoDon't you need echo "file1 file2" | xargs -P2 -n1 gzip ?
- Goladus 16y agoProbably, although it doesn't seem to be the focus of xargs. And the version of xargs that is included with Solaris 10 doesn't have the -P option. In which case, installing gnu parallel is a slightly easier option than installing a different version of xargs.
- oletange 16y agoPlease read http://www.gnu.org/software/parallel/man.html#differences_between_xargs_and_gnu_parallel http://www.gnu.org/software/parallel/man.html#differences_be... before selecting xargs.