{"id":3239,"date":"2012-09-11T20:35:47","date_gmt":"2012-09-12T03:35:47","guid":{"rendered":"http:\/\/www.podfeet.com\/wordpress\/?page_id=3239"},"modified":"2017-07-31T14:48:45","modified_gmt":"2017-07-31T21:48:45","slug":"encrypt-file-folder-osx","status":"publish","type":"page","link":"https:\/\/www.podfeet.com\/blog\/tutorials-5\/encrypt-file-folder-osx\/","title":{"rendered":"How to Encrypt a File or Folder in OSX"},"content":{"rendered":"<p><!-- Start ScreenSteps Content --><\/p>\n<div class=\"LessonContent\">\n<div class=\"LessonSummary\">\n<p>You need to email a file or folder of files to someone, but the information is sensitive. These slightly geeky but easy to follow instructions will show you how to do it.<\/p>\n<p>We&#8217;re going to compress the file(s) into a single zip file that&#8217;s encrypted by issuing one single command into the Terminal.<\/p>\n<p>When you email the zipped file to a Mac or Windows user, all they will have to do is double click the file and enter the password you used to encrypt the file. Please after doing this do NOT put the password in the body of the email! Call them, text them, direct tweet them, just don&#8217;t put it in the email.<\/p>\n<p><!--more--><\/p>\n<\/div>\n<div class=\"LessonStep top\">\n<h3 class=\"StepTitle\">One File One Folder<\/h3>\n<div class=\"StepImage\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.podfeet.com\/wordpress\/wp-content\/uploads\/2013\/02\/wpid3283-media_1347422597307.png\" alt=\"wpid3283-media_1347422597307.png\" width=\"359\" height=\"47\" \/><\/div>\n<div class=\"StepInstructions\">\n<p>For this example, we&#8217;ll start with a text document entitled bob.rtf and a folder is called bob_folder. Ready?<\/p>\n<\/div>\n<\/div>\n<div class=\"LessonStep top\">\n<h3 class=\"StepTitle\">Open Terminal<\/h3>\n<div class=\"StepImage\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.podfeet.com\/wordpress\/wp-content\/uploads\/2013\/02\/wpid3284-media_1347422743990.png\" alt=\"wpid3284-media_1347422743990.png\" width=\"540\" height=\"165\" \/><\/div>\n<div class=\"StepInstructions\">\n<p>Launch the Terminal, located inside Applications\/Utilities.<\/p>\n<\/div>\n<\/div>\n<div class=\"LessonStep top\">\n<h3 class=\"StepTitle\">Terminal<\/h3>\n<div class=\"StepImage\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.podfeet.com\/wordpress\/wp-content\/uploads\/2013\/02\/wpid3285-media_1347422830424.png\" alt=\"wpid3285-media_1347422830424.png\" width=\"377\" height=\"83\" \/><\/div>\n<\/div>\n<div class=\"LessonStep top\">\n<h3 class=\"StepTitle\">Print Working Directory<\/h3>\n<div class=\"StepImage\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.podfeet.com\/wordpress\/wp-content\/uploads\/2013\/02\/wpid3286-media_1347422973329.png\" alt=\"wpid3286-media_1347422973329.png\" width=\"380\" height=\"85\" \/><\/div>\n<div class=\"StepInstructions\">\n<p>Type pwd to print the working directory which will tell us where in the directory structure Terminal opened. In the image above, it shows I&#8217;m in my user directory allison on the hard drive fatso. I have a bit of a non-standard setup, you should see \/Users\/yourusername. If you don&#8217;t, type<\/p>\n<pre>    cd ~<\/pre>\n<p>which means change directory to my user home directory.<\/p>\n<\/div>\n<\/div>\n<div class=\"LessonStep top\">\n<h3 class=\"StepTitle\">Change Directory to Desktop<\/h3>\n<div class=\"StepImage\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.podfeet.com\/wordpress\/wp-content\/uploads\/2013\/02\/wpid3287-media_1347423333585.png\" alt=\"wpid3287-media_1347423333585.png\" width=\"232\" height=\"33\" \/><\/div>\n<div class=\"StepInstructions\">\n<p>By typing<\/p>\n<pre>    cd Desktop<\/pre>\n<p>we have moved down into the desktop folder. Note that Desktop must start with a capital D.<\/p>\n<\/div>\n<\/div>\n<div class=\"LessonStep top\">\n<h3 class=\"StepTitle\">List Files<\/h3>\n<div class=\"StepImage\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.podfeet.com\/wordpress\/wp-content\/uploads\/2013\/02\/wpid3288-media_1347423458955.png\" alt=\"wpid3288-media_1347423458955.png\" width=\"407\" height=\"59\" \/><\/div>\n<div class=\"StepInstructions\">\n<p>If you type<\/p>\n<pre>    ls -l<\/pre>\n<p>you&#8217;ll get a listing of all the files on your desktop. I do this just to ensure that I know I&#8217;m in the right place and to be sure the files are there. If you&#8217;re like most people you might have a lot of files on your desktop, but just look to make sure the file and\/or folder you want to encrypt is there.<\/p>\n<\/div>\n<\/div>\n<div class=\"LessonStep top\">\n<h3 class=\"StepTitle\">And Now to Zip<\/h3>\n<div class=\"StepImage\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.podfeet.com\/wordpress\/wp-content\/uploads\/2013\/02\/wpid3289-media_1347423654127.png\" alt=\"wpid3289-media_1347423654127.png\" width=\"540\" height=\"184\" \/><\/div>\n<div class=\"StepInstructions\">\n<ol>\n<li>All the heavy lifting is over. Simply type:<\/li>\n<\/ol>\n<pre>    zip -e bob.zip bob.rtf<\/pre>\n<p>That zips bob.rtf up, encrypts it, and makes it into bob.zip.<br \/>\n2. Now Terminal will ask you (twice) for the password to UNencrypt the file &lt;&#8211; Remember this password!<br \/>\n3. Let&#8217;s verify the file was created by typing<\/p>\n<pre>    ls -l<\/pre>\n<p>4. As you can see we now have bob.rtf AND bob.zip<\/p>\n<\/div>\n<\/div>\n<div class=\"LessonStep top\">\n<h3 class=\"StepTitle\">Test bob.zip<\/h3>\n<div class=\"StepImage\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.podfeet.com\/wordpress\/wp-content\/uploads\/2013\/02\/wpid3290-media_1347424056311.png\" alt=\"wpid3290-media_1347424056311.png\" width=\"493\" height=\"190\" \/><\/div>\n<div class=\"StepInstructions\">\n<p>In the Finder, double click on bob.zip and it should launch the Archive Utility built into OSX and then prompt you for a password to open the file.<\/p>\n<\/div>\n<\/div>\n<div class=\"LessonStep top\">\n<h3 class=\"StepTitle\">Bonus Tip &#8211; Zip and Encrypt a Folder<\/h3>\n<div class=\"StepImage\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.podfeet.com\/wordpress\/wp-content\/uploads\/2013\/02\/wpid3291-media_1347424247730.png\" alt=\"wpid3291-media_1347424247730.png\" width=\"437\" height=\"238\" \/><\/div>\n<div class=\"StepInstructions\">\n<p>You only have to add two characters \/* to the command to encrypt a folder. This time our folder is called bob_folder so the command is:<\/p>\n<pre>    zip -e bob_folder.zip bob_folder\/*<\/pre>\n<p>If you have folders within that folder, be sure to add -r to the command to recursively archive the folder:<\/p>\n<pre><span style=\"color: #000000;\">    zip -er bob_folder.zip bob_folder\/*<\/span><\/pre>\n<p>As you can see above you&#8217;ll be prompted twice for the password to encrypt the file and then you&#8217;re done! Just as before, a Windows or Mac user can double click this encrypted zip file and it will delightful expand into a nice folder when the password is entered.<\/p>\n<\/div>\n<\/div>\n<div class=\"LessonStep top\">\n<h3 class=\"StepTitle\">Final Word<\/h3>\n<div class=\"StepInstructions\">\n<p>Just in case you missed it the first time, please after going to this much care do NOT put the password to unencrypt the file into the email itself! Call the person, text, them, carrier pigeon if you have to, just don&#8217;t put the two things together!<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!-- End ScreenSteps Content --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You need to email a file or folder of files to someone, but the information is sensitive. These slightly geeky but easy to follow instructions will show you how to do it. We&#8217;re going to compress the file(s) into a single zip file that&#8217;s encrypted by issuing one single command into the Terminal. When you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":4374,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"jetpack_post_was_ever_published":false,"footnotes":""},"categories":[],"tags":[150,152,9],"class_list":["post-3239","page","type-page","status-publish","hentry","tag-mac-tutorials","tag-security-tutorials","tag-tutorials","post"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/pages\/3239","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/comments?post=3239"}],"version-history":[{"count":11,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/pages\/3239\/revisions"}],"predecessor-version":[{"id":12367,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/pages\/3239\/revisions\/12367"}],"up":[{"embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/pages\/4374"}],"wp:attachment":[{"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/media?parent=3239"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/categories?post=3239"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/tags?post=3239"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}