3 ms·
My most common use of xarsg -P is for compressing logs on remote hosts before downloading them: cat RemoteHosts | xargs -P 0 -n 1 -I Host rsh Host gzip -9 xxx/*
by webreac 14y ago
My most common use of xarsg -P is for compressing logs on remote hosts before downloading them:
cat RemoteHosts | xargs -P 0 -n 1 -I Host rsh Host gzip -9 xxx/*.log
The cool thing is that it waits until the completion of all the commands before returning.
- samvittighed 14y agoWith GNU Parallel it looks like this: parallel --nonall --slf RemoteHosts -j0 gzip -9 xxx/*.log If you have multple CPUs on your remote hosts and have GNU Parallel installed there: parallel --nonall --slf RemoteHosts -j0 --arg-sep , parallel gzip -9 ::: xxx/*.log
- Nick_C 14y agorsh or ssh? All my VPSs have rsh disabled.