I am trying to use jpegoptim for optimizing all jpg and jpeg images on my server recursively.
This command is working:
find . -type f -name "*.jpg" -exec jpegoptim --strip-all {} \;
but i need something like this:
find . -type f -name "*.jpg" -or -name "*.jpeg" -exec jpegoptim --strip-all {} \;
which is not working. Is there a way to do that ?
Try something like this:
find . -type f \( -name "*.jpg" -o -name "*.jpeg" \) -exec jpegoptim --strip-all {} \;