Skip to content

Xargs: Parallel Command Execution

Learn how to use xargs command in Unix/Linux for parallel execution of commands, optimizing efficiency and performance.


Parallel File Search and Grep
adb shell find /data/data -name '*db' -type f -print0 | xargs -0 -n1 -P$(nproc) sh -c 'strings "$0"'| grep -i 'foo'
Parallel SQLite3 Database Dump
adb shell find /data -name '*db' -type f -print0 | xargs -0 -n1 -P$(nproc) sh -c 'echo .dump'| sqlite3 "$0"'