GPGTAR(1) GNU Privacy Guard 2.4 GPGTAR(1)

# [NAME](#NAME)

**gpgtar** - Encrypt or sign files into an archive

# [SYNOPSIS](#SYNOPSIS)

**gpgtar** \[*options*] *filename1* *\[ filename2, ... ]* *directory1* *\[ directory2, ... ]*

# [DESCRIPTION](#DESCRIPTION)

**gpgtar** encrypts or signs files into an archive. It is an gpg-ized tar using the same format as used by PGP's PGP Zip.

# [OPTIONS](#OPTIONS)

**gpgtar** understands these options:

[**--create**](#create)

Put given files and directories into a vanilla \`\`ustar'' archive.

[**--extract**](#extract)

Extract all files from a vanilla \`\`ustar'' archive. If no file name is given (or it is "-") the archive is taken from stdin.

[**--encrypt**](#encrypt)

[**-e**](#e)

Encrypt given files and directories into an archive. This option may be combined with option **--symmetric** for an archive that may be decrypted via a secret key or a passphrase.

[**--decrypt**](#decrypt)

[**-d**](#d)

Extract all files from an encrypted archive. If no file name is given (or it is "-") the archive is taken from stdin.

[**--sign**](#sign)

[**-s**](#s)

Make a signed archive from the given files and directories. This can be combined with option **--encrypt** to create a signed and then encrypted archive.

[**--list-archive**](#list)

[**-t**](#t)

List the contents of the specified archive. If no file name is given (or it is "-") the archive is taken from stdin.

[**--symmetric**](#symmetric)

[**-c**](#c)

Encrypt with a symmetric cipher using a passphrase. The default symmetric cipher used is AES-128, but may be chosen with the **--cipher-algo** option to **gpg**.

[**--recipient *user***](#recipient)

[**-r *user***](#r)

Encrypt for user id *user*. For details see **gpg**.

[**--local-user *user***](#local)

[**-u *user***](#u)

Use *user* as the key to sign with. For details see **gpg**.

[**--output *file***](#output)

[**-o *file***](#o)

Write the archive to the specified file *file*.

[**--verbose**](#verbose)

[**-v**](#v)

Enable extra informational output.

[**--quiet**](#quiet)

[**-q**](#q)

Try to be as quiet as possible.

[**--skip-crypto**](#skip)

Skip all crypto operations and create or extract vanilla \`\`ustar'' archives.

[**--dry-run**](#dry)

Do not actually output the extracted files.

[**--directory *dir***](#directory)

[**-C *dir***](#C)

Extract the files into the directory *dir*. The default is to take the directory name from the input filename. If no input filename is known a directory named ‘*GPGARCH*’ is used. For tarball creation, switch to directory *dir* before performing any operations.

[**--files-from *file***](#files)

[**-T *file***](#T)

Take the file names to work from the file *file*; one file per line.

[**--null**](#null)

Modify option **--files-from** to use a binary nul instead of a linefeed to separate file names.

[**--utf8-strings**](#utf8)

Assume that the file names read by **--files-from** are UTF-8 encoded. This option has an effect only on Windows where the active code page is otherwise assumed.

[**--openpgp**](#openpgp)

This option has no effect because OpenPGP encryption and signing is the default.

[**--cms**](#cms)

This option is reserved and shall not be used. It will eventually be used to encrypt or sign using the CMS protocol; but that is not yet implemented.

[**--batch**](#batch)

Use batch mode. Never ask but use the default action. This option is passed directly to **gpg**.

[**--yes**](#yes)

Assume "yes" on most questions. Often used together with **--batch** to overwrite existing files. This option is passed directly to **gpg**.

[**--no**](#no)

Assume "no" on most questions. This option is passed directly to **gpg**.

[**--require-compliance**](#require)

This option is passed directly to **gpg**.

[**--status-fd *n***](#status)

Write special status strings to the file descriptor *n*. See the file DETAILS in the documentation for a listing of them.

[**--with-log**](#with)

When extracting an encrypted tarball also write a log file with the gpg output to a file named after the extraction directory with the suffix ".log".

[**--set-filename *file***](#set)

Use the last component of *file* as the output directory. The default is to take the directory name from the input filename. If no input filename is known a directory named ‘*GPGARCH*’ is used. This option is deprecated in favor of option **--directory**.

**--no-compress**

This option tells gpg to disable compression (i.e. using option -z0). It is useful for archiving only large files which are already compressed (e.g. a set of videos).

[**--gpg *gpgcmd***](#gpg)

Use the specified command *gpgcmd* instead of **gpg**.

[**--gpg-args *args***](#gpg~2)

Pass the specified extra options to **gpg**.

[**--tar-args *args***](#tar)

Assume *args* are standard options of the command **tar** and parse them. The only supported tar options are "--directory", "--files-from", and "--null" This is an obsolete options because those supported tar options can also be given directly.

[**--tar *command***](#tar~2)

This is a dummy option for backward compatibility.

[**--version**](#version)

Print version of the program and exit.

[**--help**](#help)

Display a brief help page and exit.

# [EXAMPLES](#EXAMPLES)

Encrypt the contents of directory ‘*mydocs*’ for user Bob to file ‘*test1*’:

```
gpgtar --encrypt --output test1 -r Bob mydocs
```

List the contents of archive ‘*test1*’:

```
gpgtar --list-archive test1
```

# [DIAGNOSTICS](#DIAGNOSTICS)

The program returns 0 if everything was fine, 1 otherwise.

# [SEE ALSO](#SEE_ALSO)

[**gpg**(1)](/man/os/gnupg/gpg.1), [**tar**(1)](/man/os/gnupg/tar.1),

The full documentation for this tool is maintained as a Texinfo manual. If GnuPG and the info program are properly installed at your site, the command

```
info gnupg
```

should give you access to the complete manual including a menu structure and an index.

2025-12-30 GnuPG 2.4.9

---

Document: gpgtar(1) from gnupg 2.4.9-r12 (Chainguard OS)
Source: https://github.com/gpg/gnupg
