Boston Linux & UNIX was originally founded in 1994 as part of The Boston Computer Society. We meet on the third Wednesday of each month at the Massachusetts Institute of Technology, in Building E51.

BLU Discuss list archive

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

[Discuss] GNU xargs trick

Daniel Barrett <dbarrett at> writes:

> 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:

New line characters in particular. -I changes matters to line at a time
so other space characters should be okay, right?

Mike Small
smallm at

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 /