patool/doc/patool.1

141 lines
5.5 KiB
Groff
Raw Normal View History

2010-02-21 11:14:57 +00:00
.\" -*- nroff -*-
2014-03-30 08:00:10 +00:00
.\" Copyright (C) 2010-2014 Bastian Kleineidam
2010-02-21 11:14:57 +00:00
.\"
.\" 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" "July 2013" "patool"
2010-02-21 11:14:57 +00:00
.SH NAME
2013-03-28 18:42:02 +00:00
patool - portable archive file manager
2010-02-21 11:14:57 +00:00
.SH SYNOPSIS
\fBpatool\fP [\fIglobal-options\fP] (\fBlist\fP|\fBtest\fP|\fBextract\fP|\fBcreate\fP|\fBdiff\fP|\fBsearch\fP|\fBrepack\fP|\fBformats\fP) [\fIcommand-options\fP] <\fIcommand-arguments\fP>...
2010-02-21 11:14:57 +00:00
.SH DESCRIPTION
2013-02-26 19:42:05 +00:00
Various archive formats can be created, extracted, tested, listed, searched, repacked and compared by
2010-02-22 17:28:07 +00:00
\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.
2010-02-21 11:14:57 +00:00
.PP
\fBpatool\fP supports 7z (.7z), ACE (.ace), ADF (.adf), ALZIP (.alz),
APE (.ape), AR (.a), ARC (.arc), ARJ (.arj),
2013-03-12 06:32:59 +00:00
BZIP2 (.bz2), CAB (.cab), COMPRESS (.Z), CPIO (.cpio), DEB (.deb), DMS (.dms),
2013-02-27 18:38:07 +00:00
FLAC (.flac), GZIP (.gz), ISO (.iso), LRZIP (.lrz), LZH (.lha, .lzh), LZIP (.lz),
2012-05-17 19:22:56 +00:00
LZMA (.lzma), LZOP (.lzo), RPM (.rpm), RAR (.rar), RZIP (.rz), SHN (.shn),
2014-09-22 21:16:21 +00:00
TAR (.tar), XZ (.xz), ZIP (.zip, .jar), ZOO (.zoo) and ZPAQ (.zpaq) formats.
2010-02-21 11:14:57 +00:00
It relies on helper applications to handle those archive formats
(for example bzip2 for BZIP2 archives).
2012-05-12 07:05:20 +00:00
.PP
The archive formats TAR, ZIP, BZIP2 and GZIP
2012-05-12 07:05:20 +00:00
are supported natively and do not require helper applications to be
installed.
.SH EXAMPLES
\fBpatool extract archive.zip otherarchive.rar\fP
\fBpatool --verbose test dist.tar.gz\fP
\fBpatool list package.deb\fP
\fPpatool --verbose create myfiles.zip file1.txt dir/\fP
2013-02-26 19:42:05 +00:00
\fBpatool diff release1.0.tar.xz release2.0.zip\fP
2013-02-22 17:38:52 +00:00
\fBpatool search "def urlopen" python-3.3.tar.gz\fP
2010-03-11 17:33:58 +00:00
\fBpatool repack linux-2.6.33.tar.gz linux-2.6.33.tar.bz2\fP
.SH GLOBAL OPTIONS
.TP
\fB\-v\fP, \fB\-\-verbose\fP
Display more info about what patool does, and display the output
of helper applications. Can be given multiple times to increase
the output even more.
2010-02-21 11:14:57 +00:00
.SH COMMANDS
2013-02-22 17:38:52 +00:00
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.
2013-02-26 19:42:05 +00:00
.IP "\(bu" 4
2013-06-11 19:12:02 +00:00
Files outside the output directory will never be created. This relies on
2013-02-26 19:42:05 +00:00
archive program options to prevent unpacking of files with an absolute
path name (eg. \fB\-\-no\-absolute\-filenames\fP for \fBcpio(1)\fP).
2013-02-22 17:38:52 +00:00
.PP
The following commands are available.
2013-02-22 17:38:52 +00:00
.SS extract
2013-02-26 19:42:05 +00:00
\fBpatool\fP \fBextract\fP [\fB\-\-outdir\fP \fIdirectory\fP] <\fIarchive\fP>...
.PP
Extract files from given archives. The original archives will never
be removed and are left as is.
.TP
2013-02-26 19:42:05 +00:00
\fB\-\-outdir\fP \fIdirectory\fP
Extract to the given output directory. Default is to extract to
the current working directory.
2010-03-18 18:26:07 +00:00
.PP
2012-10-24 21:52:58 +00:00
If the archive contains exactly one
file or directory, the archive contents are extracted directly to the
output directory.
Else the files are extracted in a newly created subdirectory of the output
directory. The new directory is named after the archive filename without
2012-10-24 21:52:58 +00:00
the extension.
2010-03-06 14:23:16 +00:00
.br
This prevents cluttering the output directory with a lot
2010-03-19 12:09:16 +00:00
of files from the extracted archive.
2010-03-18 18:26:07 +00:00
.PP
2010-03-19 12:09:16 +00:00
All extracted files are ensured that they are readable by the
2010-03-06 14:23:16 +00:00
current user.
2013-02-22 17:38:52 +00:00
.SS list
\fBpatool\fP \fBlist\fP <\fIarchive\fP>...
.PP
List files in archives.
2013-02-22 17:38:52 +00:00
.SS create
\fBpatool\fP \fBcreate\fP <\fIarchive\fP> <\fIfile-or-directory\fP>...
.PP
Create an archive from given files. All of the given files to add
to the archive must be readable by the current user.
2010-03-18 18:26:07 +00:00
The format of the archive to create is determined by the archive file
extension.
2013-02-22 17:38:52 +00:00
.SS test
\fBpatool\fP \fBtest\fP <\fIarchive\fP>...
.PP
Test the given archives. If the helper application does not support
2010-03-18 18:26:07 +00:00
testing, the archive contents are listed instead.
2013-02-22 17:38:52 +00:00
.SS diff
\fBpatool\fP \fBdiff\fP <\fIarchive1\fP> <\fIarchive2\fP>
.PP
2013-02-22 17:38:52 +00:00
Show differences between two archives with the \fBdiff(1)\fP program.
2010-03-18 18:26:07 +00:00
The diff options used are \fB\-urN\fP.
2013-02-22 17:38:52 +00:00
.SS search
\fBpatool\fP \fBsearch\fP <\fIpattern\fP> <\fIarchive\fP>
.PP
2013-02-22 17:38:52 +00:00
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
\fBpatool\fP \fBrepack\fP <\fIarchive\fP> <\fIarchive_new\fP>
.PP
2010-03-18 18:26:07 +00:00
Repackage archive to a different format. The target archive format is
determined by the file extension of \fIarchive_new\fP.
2013-02-22 17:38:52 +00:00
.SS formats
\fBpatool\fP \fBformats\fP
.PP
2010-03-18 18:26:07 +00:00
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
2013-04-20 07:08:32 +00:00
.SH SHELL ALIASES
When running under a Unix shell the following aliases can be defined to save some typing:
2013-04-20 07:08:32 +00:00
\fBalias pl='patool list'\fP
\fBalias px='patool extract'\fP
\fBalias pc='patool create'\fP
\fBalias pd='patool diff'\fP
2010-02-21 11:14:57 +00:00
.SH AUTHOR
2013-02-22 17:38:52 +00:00
Bastian Kleineidam <bastian.kleineidam@web.de>
2010-02-21 11:14:57 +00:00
.SH COPYRIGHT
2014-03-30 08:00:10 +00:00
Copyright \(co 2010-2014 Bastian Kleineidam