How to Create Tar Archives for Each Folder in a Directory
The following commands create tar archives folder by folder into their own tar — so each folder becomes folder.tar.
Compressed archive
find . -type d -maxdepth 1 -mindepth 1 -exec tar zcvf {}.tar.gz {} \;Uncompressed archive
find . -type d -maxdepth 1 -mindepth 1 -exec tar cvf {}.tar {} \;