Bash script: Gzip an entire folder and keep files extensions same -


I want to continuously sort every file in a file and want to keep the original names and extensions after the compression.

I tried to sudo gzip-9 -r folder , but now the .gz extension is added to the original in every file, such as 2852b65c1d8b. Css.gz and when I want to place the name as 2852b65c1d8b.css for the gzipped file to upload to Amazon S3.

Use what you want to do:

  Find folder - Type f -exec gzip-9 {} \; -XAC MV {} .gz {} \;   

First order the files, change the second name.

Comments

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -