The hardest tarball: one archive extracts 8 different ways across tar tools
mitsuhiko · x · 2026-11-10
- A blog post constructs a tar archive creatable with a single GNU tar command that extracts 8 distinct ways depending on the tool.
- The trick: duplicate a file so GNU tar stores a hard link, rename it to café to trigger a pax UTF-8 header, then set size:=512 in the pax header (exactly one tar header's size), exploiting POSIX's ambiguous "data blocks may be included" language for hard links.
- Results: GNU tar, BusyBox, Python, Go and Perl ignore the size on the hard link and extract three files; macOS's bsdtar, closer to POSIX, writes the 512 bytes into the hard link, overwriting file's contents.
More from Fun
- Chinese SMBs play cat-and-mouse just to keep using Claude Opus — xiaosun86 · 2026-11-11
- Scoreboard meme: Gemini 4 Carbon 1, human patience 0, as releases pile up — patience_cave · 2026-11-11
- Google says 93 parallel agents built a working OS in 12 hours for under $1K — zacharynado · 2026-11-11
- 'Long descriptive names are a good habit' dunked on: enterprise Java did it for decades, universally hated — seatedro · 2026-11-11
- Prediction thread: AI may prove P≠NP within 2 years—or only an impractical P=NP algorithm — burny_tech · 2026-11-11
- Jensen Huang memes flooding the web are all rendered on NVIDIA GPUs — bilawalsidhu · 2026-11-11