Home Linux Community Forums New to Linux Getting Started with Linux [SOLVED] Command to Bulk Archive / Compress

[SOLVED] Command to Bulk Archive / Compress

Link to this post 21 Sep 09

I'm looking for a command that will compress every folder within a directory separately with the name of each archive reflecting the original folder name. I know that

tar czvf example.tar.gz example/

will compress an entire folder. However, I have not found a command to bulk archive. Is there such a command?

Link to this post 22 Sep 09

Just to answer my own question, in case somebody else stumbles on this thread, I used this commmand to bulk archive and then compress to bzip2 for maximum compression:

find -mindepth 1 -maxdepth 1 -type d -exec tar cjf {}.tar.bz2 {} \;

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Linux Training / Board