Last active
August 22, 2021 08:36
-
-
Save thetwopct/2bb7f858b3e3ea7475a4d6df419bdf7b to your computer and use it in GitHub Desktop.
Create a ZIP file with password on command line
This file contains hidden or 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
# zip a whole folder | |
zip -r [archive] [folder] | |
# example of zip a whole folder | |
zip -r plugins.zip plugins | |
# zip a whole folder with password | |
zip -er [archive] [folder] | |
# example zip a whole folder with password | |
zip -er themes.zip themes | |
## single / multple files | |
zip target.zip file1.txt file2.txt | |
# zipping up a SQL file to .zip | |
zip db.zip db.sql | |
# cleanup once done | |
rm db.zip && rm db.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment