jpegtran whole directory

左心房为你撑大大i 提交于 2019-12-12 08:04:42

问题


I want to optimize the whole test folder with jpg images from a command line. I found this but it doesn't work:

cd /home/site/html/update/test/
find . -exec jpegtran -optimize "{}" "{}.opti.jpg" "{}" \;

I want to overwrite the existing images.

Suggestions?

Answer:

find /img/path -name "*.jpg" -type f -exec jpegtran -copy none -optimize -outfile {} {} \; 

回答1:


Answer:

find /img/path -name "*.jpg" -type f -exec jpegtran -copy none -optimize -outfile {} {} \;


来源:https://stackoverflow.com/questions/15835351/jpegtran-whole-directory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!