Forrest logo
back to the gpg tool

gpg:tldr:067ca

gpg: Sign `doc.txt` without encryption (writes output to `doc.txt.asc`).
$ gpg --clearsign ${doc-txt}
try on your machine

The command "gpg --clearsign ${doc-txt}" is a command-line instruction that uses the GNU Privacy Guard (GPG) tool to digitally sign a plain text document.

Here is a breakdown of the command components:

  • "gpg" is the command used to invoke the GNU Privacy Guard tool.
  • "--clearsign" is an option that specifies the type of signing operation. When using this option, GPG creates a detached signature that is embedded within the document itself.
  • "${doc-txt}" represents the variable for the document's filename or path. It is expected that the user will replace "${doc-txt}" with the actual name or path of the plain text document they want to sign.

So, when executing this command with an appropriate document path or filename, GPG will generate a digitally signed version of the document, where the signature is embedded in the document itself.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the gpg tool