Recursive Encryption

Mike Touloumtzis miket@bluemug.com
Sat Dec 8 05:58:02 2001


On Fri, Dec 07, 2001 at 10:16:47PM -0500, Frank Tobin wrote:
> Ray Yang, at 21:20 -0500 on 2001-12-07, wrote:
> 
> > 	Sorry for sending a blank response to the list. I hit the wrong
> > key in my mail reader. As penance, I read through the documentation,
> > and I don't think there is a way using gpg alone; the way I'd do it
> > would be to put all the directories into an archive, and then to
> > encrypt the archive.
> 
> tar -zcvf - the_dir | gpg -r mykey -o the_dir.tar.gz.gpg --encrypt

Or, to preserve the directory structure while encrypting the files:

$ find -type f -exec gpg -e -r mykey '{}' \; -exec rm -f '{}' \;

miket