SHTOOL-TARBALL.TMP(1)
π SHTOOL-TARBALL.TMP(1) π
okay bestie, sit down, hydrate, because today we're talking about shtool-tarball β the GNU shtool command for rolling standardized tarballs. yes, the manual page is literally named SHTOOL-TARBALL.TMP(1) (it's a generated tmp page, we don't ask questions, we just vibe) and it lives inside the GNU Portable Shell Tool universe. π¦
β¨ NAME β¨
shtool-tarball β GNU shtool command for rolling standardized tarballs π
π SYNOPSIS π
shtool tarball [-t|--trace] [-v|--verbose] [-o|--output tarball]
[-c|--compress prog] [-d|--directory directory] [-u|--user user]
[-g|--group group] [-e|--exclude pattern] path [path ...]
π DESCRIPTION π
So this command's whole job is taking the input files sitting under path and rolling them up into a distribution tarball that tar(1) can happily extract later. it's giving β¨packagingβ¨.
Now, the four things that make an open source tarball actually good β the sacred checklist, the main character energy, periodt:
- it unpacks into a single top-level directory (no chaos splatter, we're not animals)
- that top-level directory matches the tarball filename (consistency queen π)
- the tarball files should be sorted (order is self-care)
- arbitrary names for file owner and group (so it doesn't leak your username into the archive, lowkey important)
πΈ OPTIONS πΈ
here's the whole menu, no skips, no cuts, every single one:
-v,--verboseβ display some processing information. it'll yap a little so you know what's happening π¬-t,--traceβ enable the output of the essential shell commands which are executed. so you can see exactly what it's running under the hood π-o,--output tarballβ output tarball to file tarball.-c,--compress progβ pipe the resulting tarball through compression program prog. squash it π«Ά-d,--directory directoryβ sets the top-level directory into which the tarball unpacks. by default it's tarball without the trailing".tar.*"extension. (so the name basically derives itself, cute)-u,--user userβ the user (owner) of files and directories in the tarball, set to user.-g,--group groupβ the group of files and directories in the tarball, set to group.-e,--exclude patternβ exclude files and directories matching a comma-separated list of regex pattern from the tarball. π«
heads up: directories are expanded before the filtering takes place. so like, the filter runs after the expansion, not before. iykyk.
the default filter pattern is "CVS,\\.cvsignore,\\.svn,\\.[oa]\$".
π EXAMPLE π
steal this, it's literally in the page:
# Makefile.in
dist:
...
V=`shtool version -d short ...`; \
shtool tarball -o foobar-$$V.tar.gz -c 'gzip -9' \
-u bar -g gnu -e 'CVS,\.cvsignore' .
look at that Makefile target doing the absolute most and eating every time π₯
π§ HISTORY π§
The GNU shtool tarball command was originally written by Ralf S. Engelschall <rse@engelschall.com> in 1999 for GNU shtool. a legend, fr fr π
β SEE ALSO β
shtool(1), tar(1), compress(1).
and that's the whole page bestie, we got there π this was shtool 2.0.8, dated 18-Jul-2008 β shoutout to the version and the date, iconic as always. now go roll a tarball, you got this πβ¨
π¦ where this page comes from
- debian bookworm: shtool 2.0.8-10 Β· GPL-2.0-or-later
- debian trixie: shtool 2.0.8-10 Β· GPL-2.0-or-later
- ubuntu jammy: shtool 2.0.8-10 Β· GPL-2.0-or-later
- ubuntu noble: shtool 2.0.8-10 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms