Filed under: Tips and tricks, Terminal Tips, Security
Terminal Tip: Interactive Command-line File Encryption
In OS X, you can always toss a file onto the command line instead of laboriously typing out a complete path name because Terminal supports drag and drop. Over at Murphymac, Murphy has posted a video showing you how to create a shell script using DES3 encryption to protect your files. It takes advantage of this drag and drop support so you can basically run the script and drop the file you want to encrypt. Even if you're not all that interested in encrypting your files, this videocast shows how to think about creating shell scripts with a particularly interactive OS X flare flair.

![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 1)
v said 4:50PM on 5-22-2007
please mellow out on the terminal posts...
Reply
Danny said 5:24PM on 5-22-2007
That was actually pretty informative. The easily accessible terminal is one of the great features of OSX.
Reply
Peter said 6:04PM on 5-22-2007
This is great. Thanks so much!
Reply
liz lemon said 6:13PM on 5-22-2007
I always have a tiny little Terminal window on my desktop - just for stuff like this.
Reply
Joe Rickerby said 6:58PM on 5-22-2007
That was great- more from the point of view of learning about shell scripts than anything else. A password-protected disk image is an easy encryption alternative for anyone a bit scared of the terminal...
I bet someone could make a snappy little drap-and-drop applescript for this process
Reply
ThunkDifferent.com said 7:03PM on 5-22-2007
Great video, thanks!
Reply
Donald Burr said 7:05PM on 5-22-2007
Actually, encrypted disk images are BAD, VERY BAD. To successfully decrypt something, every single encrypted bit of the disk image must be there and intact. If so much as a single-bit error were to occur anywhere within the encrypted disk image file, that would render the ENTIRE disk image undecryptable and worthless. Whereas, if you encrypt individual files, the worst that can happen is just one *file* is worthless (and if you make backups like you should, that wouldn't be so much of a problem).
Reply
Chan said 8:25PM on 5-22-2007
Please _don't_ mellow out on the terminal posts, they are a great source of information for people new to mac/unix. If some peeps don't want to read them, it only takes a miniscule amount of energy for them to flick their eyes to the next article and get on with their lives!
Reply
stoptime said 9:08AM on 5-23-2007
I love terminal tips too. But for stuff like this, I use Yojimbo and it's built-in encryption. Then, Yojimbo syncs w/ .Mac so I can pull it down on my laptop. Very handy.
Reply
King Fysel said 1:49PM on 5-23-2007
An "interactive OS X flare" would probably set your keyboard on fire. Or maybe you just have a flair for amusing use of English.
Reply
ossiejnr said 9:01AM on 5-28-2007
Because of this - I took it upon myself to create a dashboard widget to perform this very task - you can check it out at http://www.millshalligan.co.uk/software/fileencryption/index.shtml
Reply