sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit 5699d5fb642a65769a34b2894e147c927ffc89cf
parent 1df65f4af4c87955d09bfa33ef0297d302d779bb
Author: FRIGN <dev@frign.de>
Date:   Sun,  8 Feb 2015 23:16:27 +0100

Refactor tar(1) manpage

and mark it as finished in the README.
Specifically, add a small section on the compression flags, which
are basically an infected GNU limb which should be removed from
the face of the earth as soon as possible.

Diffstat:
MREADME | 2+-
Mtar.1 | 63+++++++++++++++++++++++++++++++++++++--------------------------
2 files changed, 38 insertions(+), 27 deletions(-)

diff --git a/README b/README @@ -65,7 +65,7 @@ The following tools are implemented ('*' == finished, '#' == UTF-8 support, strings no -a, -n, -t =* sync non-posix none = tail no -c, -f -= tar non-posix none +=* tar non-posix none =* tee yes none test yes none = touch no -r diff --git a/tar.1 b/tar.1 @@ -1,4 +1,4 @@ -.Dd January 31, 2015 +.Dd February 8, 2015 .Dt TAR 1 .Os sbase .Sh NAME @@ -7,54 +7,65 @@ .Sh SYNOPSIS .Nm .Op Fl C Ar dir -.Op Fl jz -.Fl x Op Fl m -| -.Fl t -.Op Fl f Ar tarfile +.Op Fl j | Fl z +.Fl x Op Fl m | Fl t +.Op Fl f Ar file .Nm .Op Fl C Ar dir -.Op Fl jz +.Op Fl j | Fl z .Fl c Ar dir -.Op Fl f Ar tarfile +.Op Fl f Ar file .Nm .Op Fl C Ar dir -.Op Fl jz +.Op Fl j | Fl z .Fl cf -.Ar tarfile Ar dir +.Ar file Ar dir .Sh DESCRIPTION .Nm -is the standard file archiver. Generally the archives -created with it are further compressed. +is the standard file archiver. .Sh OPTIONS .Bl -tag -width Ds .It Fl c Ar path -Creates tarball from +Create archive from .Ar path . .It Fl C Ar dir Change directory to .Ar dir before beginning. -.It Fl f Ar tarfile -Make -.Ar tarfile -be the archive, rather than stdin or stdout. -.It Fl j -Compress archive using bzip2. The -.Xr bzip2 1 -utility must be installed separately. +.It Fl f Ar file +Set +.Ar file +as input | output archive instead of stdin | stdout. .It Fl m Do not preserve modification time. .It Fl t -List all files in tarball. +List all files in the archive. .It Fl x -Extract tarball. -.It Fl z -Compress archive using gzip. The +Extract archive. +.It Fl j | Fl z +Use bzip2 | gzip compression. The +.Xr bzip2 1 | .Xr gzip 1 -utility must be installed separately. +utilities must be installed separately. +Using these flags is discouraged in favour of the flexibility +and clarity of pipes: +.Bd -literal -offset indent +$ bzcat archive.tar.bz2 | tar -x +$ zcat archive.tar.gz | tar -x +.Ed +.Bd -literal -offset indent +$ tar -c file ... | bzip2 > archive.tar.bz2 +$ tar -c file ... | gzip2 > archive.tar.gz +.Ed .El .Sh SEE ALSO .Xr ar 1 , .Xr bzip2 1 , .Xr gzip 1 +.Sh STANDARDS +The +.Nm +utility is compliant with the UStar (Uniform Standard Tape ARchive) +format defined in the +.St -p1003.1-88 +specification.