4 ms·
It's tough to be portable and have a one liner See https://stackoverflow.com/questions/45181115/portable-way-to-find-the-number-of-processors-cpus-in-a-shell-sc
by mjevans 2y ago
It's tough to be portable and have a one liner See https://stackoverflow.com/questions/45181115/portable-way-to-find-the-number-of-processors-cpus-in-a-shell-script https://stackoverflow.com/questions/45181115/portable-way-to...
I switched the command to a graphics magick based resize since that's the tool these days, default quality is 75% (for JPEG), but is included as a commonly desired customization. ,, is from a different comment in this thread; it seems better self-documenting than the single , I'd traditionally use.
find . -maxdepth 1 -name "*.jpg" -print0 |\
xargs -0P $(nproc --all) -I,, gm convert resize '200x200^>' -quality 75 ,, "thumbnails/,,"