Sign a lot of files

Rémi Guyomarch
Thu, 17 Feb 2000 04:34:16 +0100

On Wed, Feb 16, 2000 at 08:40:58PM +0100, Thomas Bader wrote:

> Hi all!
> I've got the following problem: I have a directory tree which should be
> shared to others via anonymous-ftp. How can I make a detached signature
> on all files in this directory tree without suplying my passphrase for
> each file to gpg?
for f in `find . -type f -print` ; do gpg --passphrase-fd 0 --yes -ba "$f" < /tmp/pp done You might want to do something smarter if you have quotes embeded in your filenames.
> There might be a possibility to use "find" for my problem, but I
> couldn'f figure out how to use it. I tried gpg in conjunction with
> the option "--passphrase-fd 0" and I used "--exec gpg -ba {} < /tmp/pp"
> as an option for find, but gpg complained about a wrong passphrase
> (surely, I put the right passphrase in /tmp/pp).
Yes, find -exec does weird things. On my FreeBSD box it signs the first file but not the others.