It’s a pretty simple process, so let’s dive into it:
-
Move the files you want to compress and encrypt to your Desktop.
-
Open Terminal by pressing
CMD
+SPACE
and searching for Terminal in the search window that pops up. -
Run the following command to zip and encrypt the selected files:
zip -e ~/Desktop/zip-file.zip ~/Desktop/secret.txt
-
Enter a password to encrypt your
.zip
file with. -
Enter the password again to make sure it’s correct.
-
The
zip
application will compress your file(s) into a.zip
and encrypt it at the same time.
It’s a good idea to delete the raw file(s) now so no-one can access them without using the password. To do this enter the following into the terminal: rm -rf secret.txt
where secret.txt is the name of your file. If you have more than one, simply add on the names of the file like this: rm -rf secret.txt secret_two.jpg third_file.docx something-else.mp3
.
Happy coding.