Created
April 8, 2019 15:26
-
-
Save lukapaunovic/79e3cd701a688cd2cf645a21e7696e4d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum install epel-release -y | |
yum install jpegoptim -y | |
yum install optipng -y | |
for i in `ls --hide='system' /var/cpanel/users/`; do | |
find /home/$i/ -type f -iname '*.jpg' -print0 | xargs -0 -n4 -P5 sudo -H -u $i jpegoptim -s | |
find /home/$i/ -type f -iname '*.jpeg' -print0 | xargs -0 -n4 -P5 sudo -H -u $i jpegoptim -s | |
find /home/$i/ -type f -iname '*.png' -print0 | xargs -0 -n4 -P5 sudo -H -u $i optipng -o1 -strip all | |
sleep 5 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment