2009-04-26

How to encypt file or directory in linux, freebsd & os x

Another short tip. The below demonstrate how to encrypt and decrypt files & folders on Mac OS X, Linux & FreeBSD using GnuPG :

encrypt :
gpg -c <file or folder>
e.g.
gpg -c plain-file-or-folder-name

Key in the password to lock the file
(This will create another file with .gpg extension and the original file or folder will still be around.)



decrypt :
gpg <file name with .gpg extension>
e.g.
gpg plain-file-or-folder-name.gpg

Key in the password to unlock the file

Ciao !!!

No comments: