Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a directory full of gpg encrypted files (all file names end with .gpg). I would like to decrypt all these files. The command "gpg filename" helps me do this one file at a time. I would like to scan all the files and decrypt in one go. I tired the one line scripts::
find . -name "*.gpg" | xargs gpg
OR
find . -name "*.gpg" -print0 | xargs -0 gpg
Both of these dont work. What is the way to do this ?
Cany anyone give me a clue please ? Please email me directly.
You could read the man pages for the utilities involved, there are about a dozen related ways of doing this.
Also, it is much neater if you use the tags for quote and code.
You tried
Code:
find . -name "*.gpg" | xargs gpg
I believe. Why not try
Code:
find . -name "*.gpg" -exec gpg {} \;
and see how that works: this takes the extra calls to xargs right out of the problem. Xargs is of little advantage here, since you have to execute an event for each file anyway: it really shines when you can make one call to process multiple targets.
That works, but for each file I have to type the passphrase again and again. This could be a pain if I have too many files to decrypt. Can anyone suggest a way out / Can we make gpg use the same passphrase again without asking ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.