patool/doc/patool.1

106 lines
4.2 KiB
Groff

.\" -*- nroff -*-
.\" Copyright (C) 2010 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 2010" "patool"
.SH NAME
patool - portable command line archive file manager
.SH SYNOPSIS
\fBpatool\fP (\fBextract\fP|\fBlist\fP|\fBtest\fP) [\fI\-\-verbose\fP] <\fIarchive-file\fP>...
\fBpatool\fP \fBcreate\fP [\fI\-\-verbose\fP] <\fIarchive-file\fP> [\fIfiles\fP...]
\fBpatool\fP \fBdiff\fP <\fIarchive1\fP> <\fIarchive2\fP>
\fBpatool\fP \fBrepack\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), ALZIP (.alz), AR (.a),
ARC (.arc), ARJ (.arj),
BZIP2 (.bz2), CAB (.cab), compress (.Z), CPIO (.cpio), DEB (.deb), GZIP (.gz),
LRZIP (.lrz), LZH (.lha, .lzh), LZIP (.lz), LZMA (.lzma), LZOP (.lzo),
RPM (.rpm), RAR (.rar), RZIP (.rz), 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).
.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 repack linux-2.6.33.tar.gz linux-2.6.33.tar.bz2\fP
.SH COMMANDS
Several commands and options are available.
.SS \fBextract\fP
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
Files are always extracted to a unique temporary directory in the
current working directory. If the archive contains exactly one
file or directory, the archive contents are moved to the current
working directory and the temporary directory will be removed.
.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.
.TP
\fB\-v\fP, \fB\-\-verbose\fP
Be verbose when extracting (if the helper application supports it).
.SS \fBlist\fP
List files in an archive.
.TP
\fB\-v\fP, \fB\-\-verbose\fP
Verbose archive listing (if the helper application supports it).
.SS \fBcreate\fP
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.
.TP
\fB\-v\fP, \fB\-\-verbose\fP
Verbose operation (if the helper application supports it).
.SS \fBtest\fP
Test files in an archive. If the helper application does not support
testing, the archive contents are listed instead.
.TP
\fB\-v\fP, \fB\-\-verbose\fP
Verbose archive testing (if the helper application supports it).
.SS \fBdiff\fP
Show differences between two archives with the \fBdiff(1)\fP utility.
The diff options used are \fB\-urN\fP.
.SS \fBrepack\fP
Repackage archive to a different format. The target archive format is
determined by the file extension.
.SS \fBformats\fP
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 <calvin@users.sourceforge.net>
.SH COPYRIGHT
Copyright \(co 2010 Bastian Kleineidam