Page MenuHomeFreeBSD

docs/41089 pax(1) -B option does not mention interaction with -z option

Authored by crees on Dec 29 2018, 9:52 PM.



I've taken the patch supplied in the PR, but added a cross-reference to zip(1) to make files to span floppies etc (if anyone still fancies doing that).

-B option of pax says that it limits the number of bytes
written to a volume, but when the -z option is also used
the number of bytes written is less than that specified,
by the compression ratio. For example, see


Add a sentence or two to the description of the -B option
along the lines of:
"Note that the specified size is for the pax image
itself. If the -z option is also used, the resulting
file may contain fewer bytes, according to the
compressibility of the archive contents."

Alternatively, perhaps the pax author could be persuaded
to run the archive size counter on the _output_ of the
gzip pipe? That would certainly be more useful.
How-To-Repeat: You won't get the same result, because you don't have my
file system contents, but any file tree should do (other
than one full of MP3 files or the like...)
pax -w -t -z -f /backup/full-${today_d}.pax -B667m $dirs
resulted in the warning message
"pax: User specified archive volume byte limit reached."
but a subsequent listing of the /backup directory shows:
-rw-r--r-- 1 root wheel 352215042 Jul 29 03:11 full-020729.pax

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

crees created this revision.Dec 29 2018, 9:52 PM
crees added inline comments.Dec 29 2018, 9:52 PM
817 ↗(On Diff #52409)

Pet igor

916 ↗(On Diff #52409)

Pet igor

bcr accepted this revision.Dec 29 2018, 10:50 PM
bcr added a subscriber: bcr.

Igor feels certainly petted enough, so I approve. ;-)

This revision is now accepted and ready to land.Dec 29 2018, 10:50 PM
This revision was automatically updated to reflect the committed changes.
crees retitled this revision from docs/31089 pax(1) -B option does not mention interaction with -z option to docs/41089 pax(1) -B option does not mention interaction with -z option.Dec 29 2018, 11:09 PM