TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

GNU Parallel – The command line power tool

106 pointsby vsbuffaloalmost 12 years ago

11 comments

eallocalmost 12 years ago
I use parallel all the time for embarrasingly parallel scientific computations on a cluster. It is very easy to use and elegant, and it&#x27;s one of the programs I&#x27;m most grateful for.<p>Recently the developers fixed a major bug for me, that child jobs on other nodes would not be killed when parallel was killed. This was the only thing stopping me from recommending it to my labmates, now there&#x27;s no reason not to use it!
评论 #6210716 未加载
oofabzalmost 12 years ago
I use GNU Parallel. I like it because its interface is simple - input is piping filenames to it, just like xargs, and output is nicely collated to the screen.<p>I used to use ppss, which does the core task just as well, but the interface is more complex.<p>I mostly use these tools to optimize large numbers of PNGs before deployment, using optipng, pngout, and&#x2F;or my own lossypng. These programs take a while to run so using all my cores gets the job done a lot quicker.
felixralmost 12 years ago
The documentation of GNU parallel (<a href="https://www.gnu.org/software/parallel/man.html" rel="nofollow">https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;parallel&#x2F;man.html</a>) also contains a lot of nice examples on how to use parallel.
rcthompsonalmost 12 years ago
i use GNU parallel exclusively in place of xargs simply because it has --dry-run.
评论 #6209893 未加载
评论 #6209944 未加载
zurnalmost 12 years ago
Anybody have a link to a version viewable without proprietary plugins? &quot;Flash Player 9 (or above) is needed to view presentations&quot;
评论 #6210651 未加载
shrikealmost 12 years ago
I use GNU Parallel with s3cmd to move big data sets in and out of S3. I can easily saturate any network connection. I was able to GET ~2TB from S3 onto a Gluster cluster in a little more than an hour by using GNU Parallel to spread the GETs across 8 instances. Incredibly powerful, easy to use tool.
adrianNalmost 12 years ago
Wow, I must have reinvented this particular wheel at least five times.
评论 #6210352 未加载
评论 #6210726 未加载
gnoealmost 12 years ago
Is parallel buggy or is it just me? For example if i have a list of ip addresses:<p><pre><code> $ cat ips.txt | sort | uniq -c | sort -rn 3 127.0.0.1 2 192.168.1.1 1 192.168.1.2 </code></pre> Now i want to reformat the output of uniq -c, i want the count to the last column:<p><pre><code> $ cat ips.txt | sort | uniq -c | sort -rn | parallel --colsep &#x27; &#x27; echo {2} {1} </code></pre> But gives empty output.. what gives? It only works if I double pipe it thru parallel like this:<p><pre><code> $ cat ips.txt | sort | uniq -c | sort -rn | \ parallel --trim lr echo | parallel --colsep &#x27; &#x27; echo {2} {1} 127.0.0.1 3 192.168.1.1 2 192.168.1.2 1</code></pre>
评论 #6226249 未加载
jftugaalmost 12 years ago
I wrote a similar program for windows.<p><a href="https://github.com/jftuga/Windows/tree/master/mp" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jftuga&#x2F;Windows&#x2F;tree&#x2F;master&#x2F;mp</a><p>The only file you need to download is mp.exe. Source code is mp.au3.
评论 #6215343 未加载
guangnanalmost 12 years ago
Load test with parallel:<p><pre><code> cat urls | parallel --jobs 4 --load 6 &#x27;curl -s -w &quot;%{time_total}\n&quot; -o &#x2F;dev&#x2F;null {}&#x27;</code></pre>
ck2almost 12 years ago
I love pssh for simplicity but I guess I better look at fancier stuff too.