Welcome to the Linux Foundation Forum!

[SOLVED] Command to Bulk Archive / Compress

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?

Comments

  • 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:
    1. find -mindepth 1 -maxdepth 1 -type d -exec tar cjf {}.tar.bz2 {} \;

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training