Boston Linux & UNIX was originally founded in 1994 as part of The Boston Computer Society. We meet on the third Wednesday of each month, online, via Jitsi Meet.

BLU Discuss list archive


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

[Discuss] GNU xargs trick



On April 27, 2016, Rich Pieri wrote:
>find . -name "*.png" -print | xargs -I{} -P 4 optipng -o1 -preserve {}

Nice trick. I'd recommend using "find -print0" and "xargs -0" for
safety, in case any of your PNG filenames contain space characters:

  find . -name "*.png" -print0 | xargs -0 -I{} -P 4 optipng -o1 -preserve {}

--
Dan Barrett
dbarrett at blazemonger.com



BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org