| Summary: | [patch] pax(1) -B option does not mention interaction with -z option | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Documentation | Reporter: | areilly | ||||
| Component: | Manual Pages | Assignee: | Chris Rees <crees> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | CC: | crees, doc | ||||
| Priority: | Normal | Keywords: | patch | ||||
| Version: | Latest | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
Attached diff adds proposed fix to pax(1). For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped See review at https://reviews.freebsd.org/D18686 Committed, with minor changes. Thanks! A commit references this bug: Author: crees Date: Sat Dec 29 23:08:59 UTC 2018 New revision: 342601 URL: https://svnweb.freebsd.org/changeset/base/342601 Log: Add a note that the use of -B option does not guarantee a size of fragment if -z option also used. Recommend the use of zip(1) if compressed files of predictable size needed. PR: docs/41089 Submitted by: Sevan Janiyan Reported by: areilly@bigpond.net.au While here, pet igor Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D18686 Changes: head/bin/pax/pax.1 |
-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 How-To-Repeat. Fix: 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 compressability 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