Created
March 22, 2017 11:31
-
-
Save network23/42e81eef1c6da398f74ba137cbd22fb5 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
#***********************************************************************************************# | |
# encrypt_folders.sh # | |
# asks for password, encrypt all folders in current dir with 7zip. Output files are 7z # | |
# # | |
# Version: 0.2 # | |
#***********************************************************************************************# | |
read -s -p "Password: " PASS | |
for folder in */ | |
do | |
7z a -r -mx0 -mmt=3 -mhe=on -p$PASS "${folder%/}.7z" "$folder" | |
done | |
# mx = compression level: 0 is store, 9 is max compression. mmt= threads. mhe=header encryption (file names). | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment