Compress every folder in the current directory with strongest compression possible

for D in *; do [ -d "${D}" ] && tar -cf - $D | xz -9 -c - > $D.tar.xz; done

Leave a Reply

Your email address will not be published. Required fields are marked *