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

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -