K
K
Konstantin2020-11-23 21:59:25
linux
Konstantin, 2020-11-23 21:59:25

How to run jpegoptim on a large list?

I launch with a team

jpegoptim -m80 /var/www/cmidnizy/data/www/flugegeheimen.com/wp-conten                               t/uploads/2020/11/*.jpg


But I get an error: /usr/bin/jpegoptim: Argument list too long

How to get around?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly Karasik, 2020-11-23
@gradk

find /var/www/cmidnizy/data/www/flugegeheimen.com/wp-content -name "*.jpg" -print0 | xargs -0 jpegoptim -m80
This is a known issue, different ways to solve for example here https://stackoverflow.com/questions/11289551/argum... ,
my answer is based on the first answer from SO

D
Dimonchik, 2020-11-23
@dimonchik2013

11/a*.jpg
11/b*.jpg
11/0*.jpg
11/9*.jpg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question