{
    "mode": "man",
    "parameter": "GPGTAR",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/GPGTAR/1/json",
    "generated": "2026-05-30T06:07:53Z",
    "synopsis": "gpgtar [options] filename1 [ filename2, ... ] directory1 [ directory2, ... ]",
    "sections": {
        "NAME": {
            "content": "gpgtar - Encrypt or sign files into an archive\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "gpgtar [options] filename1 [ filename2, ... ] directory1 [ directory2, ... ]\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "gpgtar  encrypts or signs files into an archive.  It is an gpg-ized tar using the same format\nas used by PGP's PGP Zip.\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "gpgtar understands these options:\n\n\n",
            "subsections": [
                {
                    "name": "--create",
                    "content": "Put given files and directories into a vanilla ``ustar'' archive.\n\n",
                    "long": "--create"
                },
                {
                    "name": "--extract",
                    "content": "Extract all files from a vanilla ``ustar'' archive.\n\n",
                    "long": "--extract"
                },
                {
                    "name": "--encrypt",
                    "content": "",
                    "long": "--encrypt"
                },
                {
                    "name": "-e",
                    "content": "option  --symmetric  for  an  archive  that  may  be  decrypted  via a secret key or a\npassphrase.\n\n",
                    "flag": "-e"
                },
                {
                    "name": "--decrypt",
                    "content": "",
                    "long": "--decrypt"
                },
                {
                    "name": "-d",
                    "content": "",
                    "flag": "-d"
                },
                {
                    "name": "--sign",
                    "content": "",
                    "long": "--sign"
                },
                {
                    "name": "-s",
                    "content": "option --encrypt to create a signed and then encrypted archive.\n\n",
                    "flag": "-s"
                },
                {
                    "name": "--list-archive",
                    "content": "",
                    "long": "--list-archive"
                },
                {
                    "name": "-t",
                    "content": "",
                    "flag": "-t"
                },
                {
                    "name": "--symmetric",
                    "content": "",
                    "long": "--symmetric"
                },
                {
                    "name": "-c",
                    "content": "is AES-128, but may be chosen with the --cipher-algo option to gpg.\n\n\n--recipient user",
                    "flag": "-c"
                },
                {
                    "name": "-r",
                    "content": "Encrypt for user id user. For details see gpg.\n\n\n--local-user user",
                    "flag": "-r"
                },
                {
                    "name": "-u",
                    "content": "Use user as the key to sign with.  For details see gpg.\n\n\n--output file",
                    "flag": "-u"
                },
                {
                    "name": "-o",
                    "content": "Write the archive to the specified file file.\n\n",
                    "flag": "-o"
                },
                {
                    "name": "--verbose",
                    "content": "",
                    "long": "--verbose"
                },
                {
                    "name": "-v",
                    "content": "",
                    "flag": "-v"
                },
                {
                    "name": "--quiet",
                    "content": "",
                    "long": "--quiet"
                },
                {
                    "name": "-q",
                    "content": "",
                    "flag": "-q"
                },
                {
                    "name": "--skip-crypto",
                    "content": "Skip all crypto operations and create or extract vanilla ``ustar'' archives.\n\n",
                    "long": "--skip-crypto"
                },
                {
                    "name": "--dry-run",
                    "content": "Do not actually output the extracted files.\n\n\n--directory dir",
                    "long": "--dry-run"
                },
                {
                    "name": "-C",
                    "content": "from the input filename.  If no input filename is known a directory named ‘GPGARCH’ is\nused.  For tarball creation, switch to directory dir before performing any operations.\n\n\n--files-from file",
                    "flag": "-C"
                },
                {
                    "name": "-T",
                    "content": "Take the file names to work from the file file; one file per line.\n\n\n--null Modify option --files-from to use a binary nul instead of a linefeed to separate  file\nnames.\n\n",
                    "flag": "-T"
                },
                {
                    "name": "--utf8-strings",
                    "content": "Assume that the file names read by --files-from are UTF-8 encoded.  This option has an\neffect only on Windows where the active code page is otherwise assumed.\n\n",
                    "long": "--utf8-strings"
                },
                {
                    "name": "--openpgp",
                    "content": "This option has no effect because OpenPGP encryption and signing is the default.\n\n\n--cms  This option is reserved and shall not be used.  It will eventually be used to  encrypt\nor sign using the CMS protocol; but that is not yet implemented.\n\n\n\n--set-filename file\nUse  the  last  component of file as the output directory.  The default is to take the\ndirectory name from the input filename.  If no input filename  is  known  a  directory\nnamed ‘GPGARCH’ is used.  This option is deprecated in favor of option --directory.\n\n\n--gpg gpgcmd\nUse the specified command gpgcmd instead of gpg.\n\n\n--gpg-args args\nPass the specified extra options to gpg.\n\n\n--tar-args args\nAssume  args  are  standard  options of the command tar and parse them.  The only sup‐\nported tar options are \"--directory\", \"--files-from\", and \"--null\" This is an obsolete\noptions because those supported tar options can also be given directly.\n\n",
                    "long": "--openpgp"
                },
                {
                    "name": "--version",
                    "content": "Print version of the program and exit.\n\n\n--help Display a brief help page and exit.\n\n",
                    "long": "--version"
                }
            ]
        },
        "EXAMPLES": {
            "content": "Encrypt the contents of directory ‘mydocs’ for user Bob to file ‘test1’:\n\ngpgtar --encrypt --output test1 -r Bob mydocs\n\n\nList the contents of archive ‘test1’:\n\ngpgtar --list-archive test1\n\n\n",
            "subsections": []
        },
        "DIAGNOSTICS": {
            "content": "The program returns 0 if everything was fine, 1 otherwise.\n\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "gpg(1), tar(1),\n\nThe  full  documentation  for  this tool is maintained as a Texinfo manual.  If GnuPG and the\ninfo program are properly installed at your site, the command\n\ninfo gnupg\n\nshould give you access to the complete manual including a menu structure and an index.\n\n\n\nGnuPG 2.2.27                                 2020-12-21                                    GPGTAR(1)",
            "subsections": []
        }
    },
    "summary": "gpgtar - Encrypt or sign files into an archive",
    "flags": [
        {
            "flag": "",
            "long": "--create",
            "arg": null,
            "description": "Put given files and directories into a vanilla ``ustar'' archive."
        },
        {
            "flag": "",
            "long": "--extract",
            "arg": null,
            "description": "Extract all files from a vanilla ``ustar'' archive."
        },
        {
            "flag": "",
            "long": "--encrypt",
            "arg": null,
            "description": ""
        },
        {
            "flag": "-e",
            "long": null,
            "arg": null,
            "description": "option --symmetric for an archive that may be decrypted via a secret key or a passphrase."
        },
        {
            "flag": "",
            "long": "--decrypt",
            "arg": null,
            "description": ""
        },
        {
            "flag": "-d",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": "--sign",
            "arg": null,
            "description": ""
        },
        {
            "flag": "-s",
            "long": null,
            "arg": null,
            "description": "option --encrypt to create a signed and then encrypted archive."
        },
        {
            "flag": "",
            "long": "--list-archive",
            "arg": null,
            "description": ""
        },
        {
            "flag": "-t",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": "--symmetric",
            "arg": null,
            "description": ""
        },
        {
            "flag": "-c",
            "long": null,
            "arg": null,
            "description": "is AES-128, but may be chosen with the --cipher-algo option to gpg. --recipient user"
        },
        {
            "flag": "-r",
            "long": null,
            "arg": null,
            "description": "Encrypt for user id user. For details see gpg. --local-user user"
        },
        {
            "flag": "-u",
            "long": null,
            "arg": null,
            "description": "Use user as the key to sign with. For details see gpg. --output file"
        },
        {
            "flag": "-o",
            "long": null,
            "arg": null,
            "description": "Write the archive to the specified file file."
        },
        {
            "flag": "",
            "long": "--verbose",
            "arg": null,
            "description": ""
        },
        {
            "flag": "-v",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": "--quiet",
            "arg": null,
            "description": ""
        },
        {
            "flag": "-q",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": "--skip-crypto",
            "arg": null,
            "description": "Skip all crypto operations and create or extract vanilla ``ustar'' archives."
        },
        {
            "flag": "",
            "long": "--dry-run",
            "arg": null,
            "description": "Do not actually output the extracted files. --directory dir"
        },
        {
            "flag": "-C",
            "long": null,
            "arg": null,
            "description": "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"
        },
        {
            "flag": "-T",
            "long": null,
            "arg": null,
            "description": "Take the file names to work from the file file; one file per line. --null Modify option --files-from to use a binary nul instead of a linefeed to separate file names."
        },
        {
            "flag": "",
            "long": "--utf8-strings",
            "arg": null,
            "description": "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."
        },
        {
            "flag": "",
            "long": "--openpgp",
            "arg": null,
            "description": "This option has no effect because OpenPGP encryption and signing is the default. --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. --set-filename file 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. --gpg gpgcmd Use the specified command gpgcmd instead of gpg. --gpg-args args Pass the specified extra options to gpg. --tar-args args Assume args are standard options of the command tar and parse them. The only sup‐ ported tar options are \"--directory\", \"--files-from\", and \"--null\" This is an obsolete options because those supported tar options can also be given directly."
        },
        {
            "flag": "",
            "long": "--version",
            "arg": null,
            "description": "Print version of the program and exit. --help Display a brief help page and exit."
        }
    ],
    "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"
    ],
    "see_also": [
        {
            "name": "gpg",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/gpg/1/json"
        },
        {
            "name": "tar",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/tar/1/json"
        }
    ]
}