Google Ads

Create individual tar.gz archive for every directory found in current location

This is how to automatically create individual tar.gz archive for every directory found in current location. Sometimes the whole directory might be too big to archive so I need to go one more level under and create a separate archives for each directory found.

Method 1:

find * -maxdepth 0 -type d -exec tar zcvf {}.tar.gz {} \;

Method 2:

for i in `ls ./`; do tar czvf "$i".tar.gz "$i" ; done

References, Sources and Credits:





Comments

Popular posts from this blog

A Better SKMEI 1358 Instructions Manual

A Better SKMEI 1418 / 1427 Instructions Manual

How to force stop or cancel Android download manager downloading process

SKMEI 1358 Review