🖥️parallel
➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the parallel command with important options and switches using examples.
2 minute read
▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁
# ██████╗ █████╗ ██████╗ █████╗ ██╗ ██╗ ███████╗██╗
# ██╔══██╗██╔══██╗██╔══██╗██╔══██╗██║ ██║ ██╔════╝██║
# ██████╔╝███████║██████╔╝███████║██║ ██║ █████╗ ██║
# ██╔═══╝ ██╔══██║██╔══██╗██╔══██║██║ ██║ ██╔══╝ ██║
# ██║ ██║ ██║██║ ██║██║ ██║███████╗███████╗███████╗███████╗
# ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝╚══════╝
parallel --tag echo '$(du -s {} | awk "{print \$1}") / $(find {} | wc -l)' \| bc -l ::: *
# Compute the average number of KB per file for each dir -> Shorter version using --tag
# Parallel Apache Benchmark -> (echo "https://example.com/"; echo "https://example.com/"; echo "https://example.com/"; echo "https://example.com/") | parallel -k 'ab -n 10000 -c 15 {}'
cat url_list.txt | parallel -k 'ab -n 10000 -c 15 {}'
# Converts all pngs in a folder to webp using all available cores
# As an alternative to the above command, this one ditches the unnecessary and complicated for loop in favor of a way faster multi-core approach for a task that's more CPU than I/O intensive, making it a perfect suite for GNU parallel
parallel cwebp -q 80 {} -o {.}.webp ::: *.png
# Clock
parallel -q convert -size 300x300 xc:black -stroke green -draw '{= sub l{ ($r,$v)=@_; $v*=atan2(1,0)*4/360; "line 150,150 ".int(150-$r*sin($v)).",".int(150+$r*cos($v)).";"} $_=l(25,$_/2+180).l(50,$_%60*6+180) =}' C{}.gif ::: {000..720}; convert C*gif clock.gif
# Tweetsized colorized
parallel eval convert -size 300x300 xc:black '{=sub l{($c,$r,$v)=@_;$v*=atan2(1,0);"-stroke $c -draw \"line 150,150 ".(150-$r*sin$v).",".(150+$r*cos$v).";\" "}$_=l("red",50,$_/180+2).l("green",100,$_%60/15+2)=}' C{}.gif ::: {000..719};convert C*gif clock.gif
# Shorter, faster radar (does not require numround)
parallel -q convert -size 300x300 xc:black -stroke green -draw 'line 150,150 {= $_*=atan2(1,0)*4/360; $r=50; $_=int(150-$r*sin($_)).",".int(150+$r*cos($_)) =}' R{}.gif ::: {180..540}; convert R*gif radar.gif
# Fast portscanner via Parallel
parallel -j200% -n1 -a textfile-with-hosts.txt nc -vz {} ::: 22
#==============================##==============================#
# CMD PARALLEL #
#==============================##==============================#
Cheatsheets are an excellent complement to other information sources like Linux man-pages, Linux help, or How-To’s and tutorials, as they provide compact and easily accessible information. While man-pages and detailed tutorials often contain comprehensive explanations and extensive guides, cheatsheets summarize the most important options forthe command parallel in a clear format. This allows users to quickly access the needed information for parallel without having to sift through lengthy texts. Especially in stressful situations or for recurring tasks, cheatsheets for parallel are a valuable resource to work efficiently and purposefully.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.