Re: Request for Comments: libarchive, bsdtar

From: Don Lewis (truckman_at_FreeBSD.org)
Date: 01/15/04

  • Next message: Wes Peters: "Re: About removable disks, mountroot and sw-raid"
    Date: Wed, 14 Jan 2004 21:37:50 -0800 (PST)
    To: tjr@FreeBSD.org
    
    

    On 15 Jan, Tim Robbins wrote:

    > - Padding gzip'd tar archives (with bsdtar czf) causes gzip to report
    > "trailing garbage" and fail, and in turn this causes GNU tar to fail.
    > BSD pax (-wzf) and GNU tar (czf) do not pad compressed archives.

    In the case of GNU tar, it depends on where it is writing. It pads when
    writing to stdout, but does not pad when writing to a file. I would
    hope that it pads when writing to a tape device, since many tapes
    require writing to some multiple of their native block size.

    % tar cfz /tmp/printcap.tgz /etc/printcap
    tar: Removing leading `/' from member names
    % ls -l /tmp/printcap.tgz
    -rw-r--r-- 1 dl wheel 1216 Jan 14 21:28 /tmp/printcap.tgz
    % tar cfz - /etc/printcap > /tmp/printcap.tgz
    tar: Removing leading `/' from member names
    % ls -l /tmp/printcap.tgz
    -rw-r--r-- 1 dl wheel 10240 Jan 14 21:28 /tmp/printcap.tgz

    I would prefer to have explicit control of this behavior.

    BTW, on a Unix variant that I used many years ago, there was an enhanced
    version of dd, called ddx, which had the useful option "mobs", which was
    used to specify a minimum output block size. You could run something
    like
            ddx obs=10k mobs=1k ...
    to cause all writes to be blocked to 10k except for the last partial
    write which would be padded out to at least 1k. I don't remember what
    it did if there was 1025 bytes left over for the last write ...

    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"


  • Next message: Wes Peters: "Re: About removable disks, mountroot and sw-raid"

    Relevant Pages