Create tar of all folders
This command creates one archive per direct subfolder in the current directory.
Compressed archives
Section titled “Compressed archives”find . -maxdepth 1 -mindepth 1 -type d -exec tar -czvf "{}.tar.gz" "{}" \;Uncompressed archives
Section titled “Uncompressed archives”find . -maxdepth 1 -mindepth 1 -type d -exec tar -cvf "{}.tar" "{}" \;