Using xargs
Using xargs
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. Many thanks, partha drpartha@gmail.com |
Have you tried....
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 Code:
find . -name "*.gpg" -exec gpg {} \; |
find . -name "*.gpg" -exec gpg {} \;
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 ? |
What about running a gpg-agent?
|
Not so easy. But I found a way out. Will announce the details soon through the web.
Thanks, partha |
All times are GMT -5. The time now is 08:15 AM. |