patool/doc/patool.1

116 lines
4.8 KiB
Groff

.\" -*- nroff -*-
.\" Copyright (C) 2010-2013 Bastian Kleineidam
.\"
.\" This program is free software: you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation, either version 3 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.TH PATOOL "1" "February 2013" "patool"
.SH NAME
patool - portable command line archive file manager
.SH SYNOPSIS
\fBpatool\fP (\fBlist\fP|\fBtest\fP) [\fB\-\-verbose\fP] <\fIarchive-file\fP>...
\fBpatool\fP \fBextract\fP [\fB\-\-verbose\fP] [\fB\-\-outdir=\fP\fIDIRNAME\fP] <\fIarchive-file\fP>...
\fBpatool\fP \fBcreate\fP [\fB\-\-verbose\fP] <\fIarchive-file\fP> [\fIfiles\fP...]
\fBpatool\fP \fBdiff\fP [\fB\-\-verbose\fP] <\fIarchive1\fP> <\fIarchive2\fP>
\fBpatool\fP \fBsearch\fP [\fB\-\-verbose\fP] <\fIpattern\fP> <\fIarchive-file\fP>...
\fBpatool\fP \fBrepack\fP [\fB\-\-verbose\fP] <\fIarchive1\fP> <\fIarchive2\fP>
\fBpatool\fP \fBformats\fP
.SH DESCRIPTION
Various archive types can be created, extracted, tested and listed by
\fBpatool\fP. The advantage of patool is its simplicity in handling archive
files without having to remember a myriad of programs and options.
.PP
The archive format is determined by the file(1) program and as a fallback
by the archive file extension.
.PP
\fBpatool\fP supports 7z (.7z), ACE (.ace), ADF (.adf), ALZIP (.alz),
APE (.ape), AR (.a), ARC (.arc), ARJ (.arj),
BZIP2 (.bz2), CAB (.cab), compress (.Z), CPIO (.cpio), DEB (.deb), DMS (.dms),
FLAC (.flac), GZIP (.gz), LRZIP (.lrz), LZH (.lha, .lzh), LZIP (.lz),
LZMA (.lzma), LZOP (.lzo), RPM (.rpm), RAR (.rar), RZIP (.rz), SHN (.shn),
TAR (.tar), XZ (.xz), ZIP (.zip, .jar) and ZOO (.zoo) formats.
It relies on helper applications to handle those archive formats
(for example bzip2 for BZIP2 archives).
.PP
The archive formats TAR (.tar), ZIP (.zip), BZIP2 (.bz2) and GZIP (.gz)
are supported natively and do not require helper applications to be
installed.
.SH EXAMPLES
\fBpatool extract archive.zip otherarchive.rar\fP
\fBpatool test --verbose dist.tar.gz\fP
\fBpatool list package.deb\fP
\fPpatool create --verbose myfiles.zip file1.txt dir/\fP
\fBpatool diff release1.0.tar.gz release2.0.zip\fP
\fBpatool search "def urlopen" python-3.3.tar.gz\fP
\fBpatool repack linux-2.6.33.tar.gz linux-2.6.33.tar.bz2\fP
.SH COMMANDS
The following rules apply to all commands:
.IP "\(bu" 4
Existing files are never overwritten.
.IP "\(bu" 4
The original archive will never be removed.
.IP "\(bu" 4
Verbose operation displays more info about what patool does. It also
displays more info from the helper application if it's supported.
.PP
Several commands are available.
.SS extract
Extract files from an archive. The original archive will never
be removed and is left as it is.
.br
This is the default command if no command was given.
.PP
If the archive contains exactly one
file or directory, the archive contents are extracted to the current
working directory.
Else the files are extracted in a newly created subdirectory of the current
working directory. The new directory is named after the archive filename without
the extension.
.br
This prevents cluttering the current working directory with a lot
of files from the extracted archive.
.PP
All extracted files are ensured that they are readable by the
current user.
.SS list
List files in an archive.
.SS create
Create an archive from given files. At least on of the given files to add
to the archive has to exist (non-existing files are ignored).
The format of the archive to create is determined by the archive file
extension.
.SS test
Test files in an archive. If the helper application does not support
testing, the archive contents are listed instead.
.SS diff
Show differences between two archives with the \fBdiff(1)\fP program.
The diff options used are \fB\-urN\fP.
.SS search
Search in archive contents for given pattern using the \fBgrep(1)\fP program.
The grep options used are \fB\-r\fP; additional options can be supplied
with the \fBGREP_OPTIONS\fP environment variable.
.SS repack
Repackage archive to a different format. The target archive format is
determined by the file extension.
.SS formats
Show all supported archive formats (ie. which helper applications
are available).
.SH HELP OPTION
Specifying the help option displays help for patool itself, or a
command.
.br
For example:
\fBpatool \-\-help\fP - display help for patool
\fBpatool extract \-\-help\fP - display help for the extract command
.SH AUTHOR
Bastian Kleineidam <bastian.kleineidam@web.de>
.SH COPYRIGHT
Copyright \(co 2010-2013 Bastian Kleineidam