Create individual compressed tar archives from each subdirectory (tar)
for d in */; do tar -cJf "${d%/}.tar.xz" "$d"; done
Creates a separate, compressed xz tar archive for each existing subdirectory within the current directory.
for d in */; do tar -cJf "${d%/}.tar.xz" "$d"; done
Creates a separate, compressed xz tar archive for each existing subdirectory within the current directory.