The standard pax utility comes in the box.

The Standard Unix pax utility comes in the box with the BSDs. You can just rely upon it being there, rather than fussing about making package dependencies.

There are slight differences amongst the flavours of pax available across the BSDs.

You might have already encountered paxmirabilis from MirBSD. That is the BSD pax most often seen on Linux‐based operating systems (e.g. Debian pax is paxmirabilis), since the GNU world lacks its own pax implementation.

Each BSD (of course) maintains a pax in its own base source code tree, and they are not precisely in synch. There are differences in what options are used to handle compressed files, and what compression formats are supported, for example.

paxmirabilis is in fact three programs in one. It is a multi‐call binary that acts as pax, cpio, or tar. In the GNU world, cpio and tar are entirely separate software projects.

Usually, the cpio and tar that are in pax go unused, because on most of the BSDs those programs are nowadays the libarchive versions of those utilities, also known as bsdcpio and bsdtar (albeit only actually runnable as commands by those alternative names on FreeBSD). Unlike paxmirabilis cpio and tar, the libarchive versions of those commands are not multi‐call binaries, but are separate, and much larger, programs.

It is, finally, worth remembering that pax is not solely an archive program. Combine its -r and -w options, and it copies entire directory trees around. Add the -u option and it only copies things that have been modified. Add the -l option and it makes hard links instead of copies, if it can. Add the -p a option and if it is copying it preserves timestamp information.


© Copyright 2026 Jonathan de Boyne Pollard. "Moral" rights asserted.
Permission is hereby granted to copy and to distribute this web page in its original, unmodified form as long as its last modification datestamp is preserved.