I would like to run optipng
in parallel with my 8-thread CPU using the shell.
I know the program itself is not multicore optimized, the only way will be to run 8 files with it.
I have 500+ PNG images only in my home directory, and I'd like to do the job as fast as possible.
I am likely asking a question that already has been answered, but did not find it.
If it matters, I have an alias defined for this program:
alias optipng='optipng -o7 -zm1-9 -strip all -fix -preserve'
And I want that to be applied. Please advise. The simpler the better. If POSIX, then best.
I admit I never have used xargs
or parallel
, and I assume they could be used.
Found this code in here, but it is not explained, therefore if applicable, please elaborate.