My OS is Ubuntu 20.04.2 lts.
I am creating a tar archive from the dir noup1, that contains files and subfolders, with tar cf no1.tar noup1
Encrypt it with gpg -c no1.tar
. So now I have a no1.tar.gpg
archive.
If I try to decrypt it with gpg -d no1.tar.gpg
, I get a lot of squiggly characters in the terminal and it does not work.
If I just use gpg no1.tar.gpg
, without the -d
flag, I get an output saying "no command was given. Trying to guess ..."
gpg: WARNING: Kein Kommando angegeben. Versuche zu raten was gemeint ist ...
gpg: AES256 verschlüsselte Daten
gpg: Verschlüsselt mit einer Passphrase
and the archive is now unencrypted. So this works! But how and why?
On the other hand if I use the -d
flag and pipe the result into tar it succeeds!
gpg -d no1.tar.gpg | tar xf -
How to create compressed encrypted archives with tar and gpg
So I am wondering:
What is the "guessed command" that was executed?
Why does the -d
flag not work, but it does if piped into tar, even though all relevant tutorials instruct to decrypt a tar archive using gpg -d <archive-name>
and not gpg <archive-name>
?
Is it possible I am missing some packages or something is wrong with my gpg configuration?