It seems that if I run gzip somefile.js
, I get somefile.js.gz
as the output.
However, I need to preserve the original file extension, i.e for somefile.js
, I need it to remain somefile.js
after gzipping.
How can I do that?
Edit: To be clear, I need to do this for dozens of files, so I can't just mv
each one. I simply want to gzip all the static css / js files and then upload them to my CDN, so I can serve them as regular js / css files.