patool/doc/patool.1

116 lines
4.8 KiB
Groff
Raw Normal View History

2010-02-21 11:14:57 +00:00
.\" -*- nroff -*-
2013-02-22 17:38:52 +00:00
.\" Copyright (C) 2010-2013 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.
.\"
2013-02-22 17:38:52 +00:00
.TH PATOOL "1" "February 2013" "patool"
2010-02-21 11:14:57 +00:00
.SH NAME
2010-03-12 11:54:40 +00:00
patool - portable command line archive file manager
2010-02-21 11:14:57 +00:00
.SH SYNOPSIS
2012-04-09 09:56:35 +00:00
\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...]
2013-02-22 17:38:52 +00:00
\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>
2010-03-18 18:26:07 +00:00
\fBpatool\fP \fBformats\fP
2010-02-21 11:14:57 +00:00
.SH DESCRIPTION
2010-02-21 12:40:42 +00:00
Various archive types can be created, extracted, tested and listed 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),
2011-01-24 20:28:29 +00:00
BZIP2 (.bz2), CAB (.cab), compress (.Z), CPIO (.cpio), DEB (.deb), DMS (.dms),
2012-05-17 19:22:56 +00:00
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.
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 (.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
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
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.
.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
2010-03-18 18:26:07 +00:00
Extract files from an archive. The original archive will never
be removed and is left as it is.
.br
2010-03-18 18:26:07 +00:00
This is the default command if no command was given.
.PP
2012-10-24 21:52:58 +00:00
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.
2010-03-06 14:23:16 +00:00
.br
2010-03-19 12:09:16 +00:00
This prevents cluttering the current working directory with a lot
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
2010-02-21 11:14:57 +00:00
List files in an archive.
2013-02-22 17:38:52 +00:00
.SS create
Create an archive from given files. At least on of the given files to add
2010-03-18 18:26:07 +00:00
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.
2013-02-22 17:38:52 +00:00
.SS test
2010-03-18 18:26:07 +00:00
Test files in an archive. If the helper application does not support
testing, the archive contents are listed instead.
2013-02-22 17:38:52 +00:00
.SS diff
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
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
2010-03-18 18:26:07 +00:00
Repackage archive to a different format. The target archive format is
determined by the file extension.
2013-02-22 17:38:52 +00:00
.SS formats
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
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
2013-02-22 17:38:52 +00:00
Copyright \(co 2010-2013 Bastian Kleineidam