Is there any way to encrypt the whole directory using gpg? It accepts only file as input argument. But I need to encrypt a lot of files on external HDD.

link|improve this question
There are also ways to encrypt a whole directory or drive, but they are different in scope: they offer transparent encryption (you just type a password to mount the drive), but the result can't be read by GPG or PGP. – Gilles Jan 18 '11 at 21:21
feedback

2 Answers

up vote 2 down vote accepted

Why not tar the files to be encrypted and then encrypt the tarball?

link|improve this answer
I found this to be the solution. It is not flexible and requires a lot of resources to tar and gpg date. Thanks for the answer! – gladimdim Jan 20 '11 at 6:57
@gladimdim: thanks for accepting, but what do you mean by "not flexible" and "lot of resources"? Or was there a typo? – alex Jan 20 '11 at 11:59
by "not flexible" I meant that I needed manually tar directory then gpg it. I have about 60Gb of pics which are now tarballed and gpged. It took about 2 hours and 4 concurrent terminal windows to speed up this process. Now I just tarball and gpg every new directory with pics which I create. – gladimdim Jan 27 '11 at 21:51
Hm, that seems pretty reasonable time for that size of data. Did you expect to run it a lot faster? What's you plan when you need one those pics--decrypt/untar all the 60Gigs? – alex Jan 27 '11 at 22:01
feedback

I just saw the option --multifile on the manpage:

This modifies certain other commands to accept multiple files for processing on the command line or read from STDIN with each filename on a separate line. This allows for many files to be processed at once. --multi‐ file may currently be used along with --verify, --encrypt, and --decrypt. Note that --multifile --verify may not be used with detached signatures.

What you are specifically looking for is --encrypt-files and, again the manpage:

Identical to --multifile --encrypt.

link|improve this answer
Thanks, this works good except that gpg does not support --multiple key with --symmetric option (I want to encrypt only using passphrase). – gladimdim Jan 20 '11 at 6:56
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.