Last active
May 5, 2017 14:45
-
-
Save ajthemacboy/d4ee823a367d4e0ad01878900b72a9c4 to your computer and use it in GitHub Desktop.
7zip batch ultra 7z compression
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for file in $(find . -type f -name "hdd-0.vhdx.*"); do | |
7z a -t7z $file.7z $file -m0=lzma2 -mx=9 -ms=4G -mmt=8 -aoa | |
mv $file.7z "/mnt/d/Amazon Drive/migration/iMac_Image_2-28-17" | |
done | |
# Remove ~.~ directories after backup=t | |
for dir in $(find *~* -type d); do | |
rawdir=$(echo $dir | cut -d "." -f1) | |
mv --backup=t $dir/* $rawdir | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment