'Can I add something to these commands so they delete original files?
I'm modifying hundreds of pictures with two command lines and I have to manually delete the original files before executing the second command, then delete one more time. Is it possible to add some command to these two commands so it deletes the originals by itself, and to make these two into one row command?
convert * -resize 600x600 -strip *
for f in *.jpg; do cwebp -q 92 -mt $f -o $f.webp; done
Thanks
Solution 1:[1]
convert * -resize 600x600 -strip * && find -type f ( -name "*jpg" ) -size +1M -delete && for f in *.jpg; do cwebp -q 91 -mt $f -o $f.webp; done && rm *jpg
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | RobC |