Signing Multiple Files

John Clizbe JPClizbe at tx.rr.com
Mon Feb 11 01:15:42 CET 2008


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

Lance W. Haverkamp wrote:
> Having looked through much documentation & some trial and error; it 
> seems there is no way to sign (detached) multiple files.  I need to sign 
> dozens (or hundreds) of photos at a time.  I am *not* a programmer.
> 
> I did coble together a (Linux) script:
> 
> #!/bin/bash
> for i in $( ls ); do
> gpg -b $i
> done
> 
> 
> There must be a better way, but this will sign everything in a folder. 
> I don't code enough to be able to tell the file browser to sign multiple 
> selected files recursively.
> 
> Am I missing something obvious here?

That will sign everything in a given directory, but won't recurse.
'ls -R' will recurse, but won't give you filenames in a usable format to pass
It will also attempt to sign everything in addition to the images

find . -name "*.jpeg" -print

is probably more along the lines of what you're looking for instead of ls above

for i in $(find . -name "*.jpeg" -print \;)
do
  gpg -b $i -o ${i}.sig
done

You may wish to use one of the --passphrase options,eg
'--passphrase-file <file>' or '--passphrase <string>', or temporarily remove the
passphrase from the signing key to spare yourself the 'joy' of typing the
passphrase potentially 100s of times.

Some reason you moved the thread to GnuPG-Users from PGP-Basics?

- --
John P. Clizbe                      Inet:   John (a) Mozilla-Enigmail.org
You can't spell fiasco without SCO. PGP/GPG KeyID: 0x608D2A10/0x18BB373A
"what's the key to success?"        / "two words: good decisions."
"what's the key to good decisions?" /  "one word: experience."
"how do i get experience?"          / "two words: bad decisions."

"Just how do the residents of Haiku, Hawai'i hold conversations?"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (WinXP Pent3)
Comment: When cryptography is outlawed, b25seSBvdXRsYXdzIHdpbGwgdXNlIG
Comment: Be part of the £33t ECHELON -- Use Strong Encryption.
Comment: It's YOUR right - for the time being.
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iJwEAQECAAYFAkevk6cACgkQvh+YERi7NzrAJwP+L9RfQp371S7a+0bfRECYclf0
5cZKVcK2GlYrLbKTooAFMEnA4hAy8tFYnASQiOgIG/b3a3N2dp71zjrwhbOWq30I
uECx85/KN79ibeDbkbeF3c2M36c2XX3vT12v2zqh+o6NKbFZoEd3RYG+GqC7keXd
VhMuTUod8sESX8Tr/K2IRgQBEQIABgUCR6+TpwAKCRAdBKxKYI0qEBlDAJkBoh4g
yXxfxg59pPg9Owmu+MOWLACgzLyPuL8wjpZr7tpDt8MIXpRH//g=
=6N+0
-----END PGP SIGNATURE-----



More information about the Gnupg-users mailing list