[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to refrain only use certain number of processors



lina:
> 
> I wished at most it only run 8 jobs simultantly, no more than 8, once
> finished, a new job can continue,

Xargs can be used for this. An exmaple:

$ seq 1 100 | xargs -n1 -P8 echo

Seq prints the numbers from 1 to 100 (one per line) and xargs starts an
echo for each argument with 8 invocations in parallel.

J.
-- 
Ultimately, the Millenium Dome is a spectacular monument of the
doublethink of our times.
[Agree]   [Disagree]
                 <http://www.slowlydownward.com/NODATA/data_enter2.html>

Attachment: signature.asc
Description: Digital signature


Reply to: