GPGTAR(1)
π GPGTAR(1) β the gpgtar glow-up π
okay so bestie, welcome to gpgtar, a real one from the GNU Privacy Guard 2.4 fam. this page is gonna walk you through it, no gatekeeping, i promise π«Ά
β¨ NAME β¨
gpgtar β encrypt or sign files into an archive. literally what it says on the tin π
πΈ SYNOPSIS πΈ
gpgtar [options] filename1 [ filename2, ... ] directory1 [ directory2, ... ]
so yeah, options first, then a whole parade of files and directories. bring the whole group chat, it's fine π
π¦ DESCRIPTION π¦
okay so gpgtar encrypts or signs files into an archive. it's an gpg-ized tar β like tar but it went to the crypto gym β and it uses the exact same format as PGP's PGP Zip. iykyk β¨
π OPTIONS π
gpgtar understands these options, and by "understands" i mean it's fluent, bestie:
--createβ puts the files and directories you hand it into a vanilla ``ustar'' archive. plain, classic, iconic.--extractβ extracts all the files out of a vanilla ``ustar'' archive. if you don't give a file name (or you just pass-), the archive gets read from stdin. sneaky but valid π--encrypt,-eβ encrypts the given files and directories into an archive π₯ and here's the slay: you can combine this with--symmetricand get an archive that can be decrypted either via a secret key or via a passphrase. flexible queen.--decrypt,-dβ extracts all the files from an encrypted archive. same deal: no file name (or-) means it comes from stdin.--sign,-sβ makes a signed archive from the files and directories you give it. and yeah, you can stack this with--encryptto get a signed-then-encrypted archive. layers, bestie.--list-archive,-tβ lists the contents of the archive you specified. no file name (or-) β stdin. it's giving "just let me peek" π--symmetric,-cβ encrypt with a symmetric cipher using a passphrase. the default symmetric cipher isAES-128, but you can pick another one with the--cipher-algooption togpg. options within options, very meta π--recipientuser,-ruser β encrypt for user id user. for the deets, go seegpg. π«Ά--local-useruser,-uuser β use user as the key to sign with. again, details live ingpg.--outputfile,-ofile β writes the archive to the file file. π--verbose,-vβ turns on extra informational output. she's chatty and we love that π£οΈ--quiet,-qβ tries to be as quiet as possible π€«--skip-cryptoβ skips every crypto operation and just creates or extracts vanilla ``ustar'' archives. sometimes you just want the plain version, no makeup.--dry-runβ doesn't actually output the extracted files. it's the rehearsal, not the show π--directorydir,-Cdir β extracts the files into the directory dir. the default is to take the directory name from the input filename; if no input filename is known, it uses a directory namedGPGARCH. and for tarball creation it switches to directory dir before doing any operations. multitasking icon.--files-fromfile,-Tfile β takes the file names to work on from file, one file per line. π--nullβ modifies--files-fromso it uses a binary nul instead of a linefeed to separate the file names. spicy separator.--utf8-stringsβ assumes the file names read by--files-fromare UTF-8 encoded. heads up though: this only does anything on Windows, where otherwise the active code page is assumed. windows-only behavior, ngl.--openpgpβ does absolutely nothing, bestie, because OpenPGP encryption and signing is the default anyway. it's just there vibing π--cmsβ this one is reserved and shall not be used π« eventually it'll encrypt or sign using the CMS protocol, but that is not yet implemented. respect the reservation.--batchβ use batch mode: never ask, just use the default action. this option is passed directly togpg.--yesβ assumes "yes" on most questions. often used together with--batchto overwrite existing files. also passed directly togpg. consent, but make it automated β¨--noβ assumes "no" on most questions. passed directly togpg. the boundaries option π«Ά--require-complianceβ passed directly togpg. no notes.--status-fdn β writes special status strings to the file descriptor n. check the fileDETAILSin the documentation for a list of them π--with-logβ when extracting an encrypted tarball, it also writes a log file with thegpgoutput to a file named after the extraction directory with the suffix.log. receipts.--set-filenamefile β uses the last component of file as the output directory. default is to take the directory name from the input filename, and if there's no input filename it uses a directory namedGPGARCH. β οΈ heads up: this option is deprecated in favor of--directory. we've moved on, bestie.--no-compressβ tellsgpgto disable compression (i.e. it uses option-z0). super useful for archiving only large files that are already compressed (like a set of videos π₯). no need to squeeze a squeezed thing.--gpggpgcmd β uses the command gpgcmd instead ofgpg. you can swap in your fave β¨--gpg-argsargs β passes the extra options args togpg.--tar-argsargs β assumes args are standard options of thetarcommand and parses them. the only supported tar options are--directory,--files-from, and--null. this is an obsolete option, because those supported tar options can also be given directly. history, but make it legacy π--tarcommand β a dummy option for backward compatibility. it's there for the old heads π«Ά--versionβ prints the version of the program and exits.--helpβ displays a brief help page and exits. the classic π
π EXAMPLES π
encrypt the contents of directory mydocs for user Bob into the file test1 β iconic request, honestly:
gpgtar --encrypt --output test1 -r Bob mydocs
now list the contents of that archive test1:
gpgtar --list-archive test1
see? slayed. β¨
π₯ DIAGNOSTICS π₯
the program returns 0 if everything was fine, and 1 otherwise. binary queen. no gray areas.
π SEE ALSO π
and also: the full documentation for this tool is maintained as a Texinfo manual. if GnuPG and the info program are properly installed at your site, this command:
info gnupg
should give you access to the complete manual, including a menu structure and an index. go read it, it's giving library energy π
okay that's the whole page bestie, you're basically a gpgtar expert now π
β¨ this was GnuPG 2.4.9, dated 2025-02-19 β mwah, go encrypt something ππ¦π
π¦ where this page comes from
- alpine 3.22: gnupg-doc 2.4.9-r0 Β· GPL-3.0-or-later
- alpine 3.23: gnupg-doc 2.4.9-r0 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms