nerdexam
Linux_Foundation

LFCS · Question #405

You have downloaded a file named file.tgz along with a signature file named file.tgz.asc. Which commands can be used to verify that file.tgz has not been tampered with since the file creator created…

The correct answer is A. gpg verify file.tgz.asc file.tgz C. gpg verify file.tgz.asc E. gpgv file.tgz.asc. To verify a detached GPG signature (.asc) against its corresponding data file (.tgz), you can use gpg verify with both files, gpg verify with just the signature file (if named conventionally), or the gpgv utility with just the signature file.

Submitted by cyberguy42· Apr 18, 2026Essential Commands

Question

You have downloaded a file named file.tgz along with a signature file named file.tgz.asc. Which commands can be used to verify that file.tgz has not been tampered with since the file creator created the signature? Assume that you have already retrieved the public key of the file creator. (Select THREE correct answers)

Options

  • Agpg verify file.tgz.asc file.tgz
  • Bgpg verify file.tgz
  • Cgpg verify file.tgz.asc
  • Dgpgv verify file.tgz.asc
  • Egpgv file.tgz.asc

How the community answered

(24 responses)
  • A
    75% (18)
  • B
    17% (4)
  • D
    8% (2)

Why each option

To verify a detached GPG signature (`.asc`) against its corresponding data file (`.tgz`), you can use `gpg verify` with both files, `gpg verify` with just the signature file (if named conventionally), or the `gpgv` utility with just the signature file.

Agpg verify file.tgz.asc file.tgzCorrect

The `gpg --verify <signature_file> <signed_file>` command explicitly instructs GPG to verify the integrity of the signed data file using the provided detached signature file.

Bgpg verify file.tgz

`gpg verify file.tgz` is incorrect because it expects the file itself to contain an inline signature, not a detached one, and would not automatically search for `file.tgz.asc`.

Cgpg verify file.tgz.ascCorrect

When a signature file (e.g., `file.tgz.asc`) has a conventional name corresponding to its data file (e.g., `file.tgz`), `gpg --verify file.tgz.asc` can automatically locate and verify the data file against the signature.

Dgpgv verify file.tgz.asc

`gpgv verify file.tgz.asc` is syntactically incorrect; `gpgv` itself implies verification, so the `verify` subcommand is redundant and not part of the `gpgv` syntax.

Egpgv file.tgz.ascCorrect

The `gpgv` command is a lightweight utility optimized for signature verification, and when given a detached signature file (e.g., `file.tgz.asc`), it will implicitly look for and verify the integrity of the corresponding data file (`file.tgz`).

Concept tested: GPG detached signature verification

Source: https://gnupg.org/documentation/manuals/gnupg/Verify-signatures.html

Topics

#GPG#File Verification#Digital Signatures#Command Line

Community Discussion

No community discussion yet for this question.

Full LFCS Practice