Finding all files encrypted with a certain key

raf gnupg at
Fri Oct 27 01:28:25 CEST 2023

On Thu, Oct 26, 2023 at 11:29:38AM +0800, "Felix E. Klee" <felix.klee at> wrote:

> On Wed, Oct 25, 2023 at 9:23 PM Werner Koch <wk at> wrote:
> > >     gpg: decryption failed: No secret key
> > >
> > > I wonder how to get rid of that.
> >
> > grep -v on stderr ;-).
> Thanks, I was thinking about that. But I think simply using find, as
> suggested by Andrew and raf, is sufficient and simple.

rh intead of find+n*(sh+file+grep) is even simpler (but I'm biased). :-)

> > I think it is time to make things like this easier. Actually
> > re-encrypt support has been on our feature list for many years.
> That would be fancy. Personally, I’m happy with a bit of shell
> scripting. My use case is rather simple, and I don’t need to do
> re-encryption very often.

Yeah. I think gpg -d ... | gpg -e -r ... is simple enough. I use that
(in a "recrypt" python script) for annual key rollover re-encryptions
of many database backups.


More information about the Gnupg-users mailing list