Hacker News new | ask | show | jobs
by djha-skin 25 days ago
Tl;dr don't use pax.

Hit up Wikipedia for tarball format and you may agree with me. It's a classic example of a standard where you look at it and go, "??? Who asked for that?". I'm not surprised the article focuses on pax when finding tar inconsistencies. Original tar is just fine.

2 comments

Pax has an interesting use in POSIX: combined with od, pax is the only way (in POSIX) to get a Unix timestamp from the command line. The exact command line is left as an exercise for the interested reader.
As of POSIX.1-2024 you can use %s to get the number of seconds since the epoch. But that was indeed not specified in earlier POSIX versions, AFAIK.
I don’t really think pax is the issue here, although pax is a bad specification in absolute terms. But “classic” (V7) tar just isn’t specified at all, and has plenty of its own differentials.

(Users also want things like filenames that are longer than 100 characters, for obvious reasons.)