Multiple files

Todd Freedom_Lover at pobox.com
Thu Feb 3 18:54:28 CET 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Johan Wevers wrote:
> Kevin Smith wrote:
>>
>>Is there a way to encrypt multiple files at one time...say I want to
>>encrypt EVERY file in a folder called tobeencrypted...any easy way??
>
> #!/bin/bash
> for i in *; do gpg -e -r myname $i; done

Or, in 1.2.5 and above, use the multifile option:

    gpg --multifile --encrypt tobeencrypted/*

That would get you an individually encrypted file for each file in the
directory.  You might also want to just tar up the directory and then
encrypt that.

    tar -cf - dir/ | gpg -r 0x0123456 --encrypt -o dir.tar.gpg

- -- 
Todd        OpenPGP -> KeyID: 0xD654075A | URL: www.pobox.com/~tmz/pgp
======================================================================
I'm proud to be paying taxes in the U.S. The only thing is-I could be
just as proud for half the money.
    -- Arthur Godfrey

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: When crypto is outlawed bayl bhgynjf jvyy unir cevinpl.

iG0EARECAC0FAkICZVMmGGh0dHA6Ly93d3cucG9ib3guY29tL350bXovcGdwL3Rt
ei5hc2MACgkQuv+09NZUB1oIKQCgyQcSRK2W/nzmRPy5uCLmTC6aURIAn2GxQ3O+
uqZvDnzzg2GIYtMFAEQ1
=6K2V
-----END PGP SIGNATURE-----



More information about the Gnupg-users mailing list