1PATOOL(1) General Commands Manual PATOOL(1)
2
3
4
6 patool - portable archive file manager
7
9 patool [global-options] (list|test|extract|cre‐
10 ate|diff|search|repack|recompressfP|formats) [command-options] <com‐
11 mand-arguments>...
12
14 Various archive formats can be created, extracted, tested, listed,
15 searched, repacked, recompressed and compared by patool. The advantage
16 of patool is its simplicity in handling archive files without having to
17 remember a myriad of programs and options.
18
19 The archive format is determined by the file(1) program and as a fall‐
20 back by the archive file extension.
21
22 patool supports 7z (.7z, .cb7), ACE (.ace, .cba), ADF (.adf), ALZIP
23 (.alz), APE (.ape), AR (.a), ARC (.arc), ARJ (.arj), BZIP2 (.bz2), CAB
24 (.cab), COMPRESS (.Z), CPIO (.cpio), DEB (.deb), DMS (.dms), FLAC
25 (.flac), GZIP (.gz), ISO (.iso), LRZIP (.lrz), LZH (.lha, .lzh), LZIP
26 (.lz), LZMA (.lzma), LZOP (.lzo), RPM (.rpm), RAR (.rar, .cbr), RZIP
27 (.rz), SHN (.shn), TAR (.tar, .cbt), XZ (.xz), ZIP (.zip, .jar, .cbz),
28 ZOO (.zoo) and ZPAQ (.zpaq) archive formats.
29 It relies on helper applications to handle those archive formats (for
30 example bzip2 for BZIP2 archives).
31
32 The archive formats TAR, ZIP, BZIP2 and GZIP are supported natively and
33 do not require helper applications to be installed.
34
36 patool extract archive.zip otherarchive.rar
37 patool --verbose test dist.tar.gz
38 patool list package.deb
39 patool --verbose create myfiles.zip file1.txt dir/
40 patool diff release1.0.tar.xz release2.0.zip
41 patool search "def urlopen" python-3.3.tar.gz
42 patool repack linux-2.6.33.tar.gz linux-2.6.33.tar.bz2
43 patool recompress images.zip
44
46 -v, --verbose
47 Display more info about what patool does, and display the output
48 of helper applications. Can be given multiple times to increase
49 the output even more.
50
51 --non-interactive
52 Try to prevent any interactive user input (ie. prompting for
53 passwords or for overwriting duplicate files). Use this option
54 with care since overwriting files or ignoring password prompts
55 could lead to unintended consequences.
56 This only works for programs that allow preventing user prompts.
57 Currently those are arj, 7z and rar.
58
60 The following rules apply to all commands:
61
62 · Existing files are never overwritten.
63
64 · The original archive will never be removed.
65
66 · Files outside the output directory will never be created. This
67 relies on archive program options to prevent unpacking of files
68 with an absolute path name (eg. --no-absolute-filenames for
69 cpio(1)).
70
71 The following commands are available.
72
73 extract
74 patool extract [--outdir directory] <archive>...
75
76 Extract files from given archives. The original archives will never be
77 removed and are left as is.
78
79 --outdir directory
80 Extract to the given output directory. Default is to extract to
81 the current working directory.
82
83 If the archive contains exactly one file or directory, the archive con‐
84 tents are extracted directly to the output directory. Else the files
85 are extracted in a newly created subdirectory of the output directory.
86 The new directory is named after the archive filename without the
87 extension.
88 This prevents cluttering the output directory with a lot of files from
89 the extracted archive.
90
91 All extracted files are ensured that they are readable by the current
92 user.
93
94 list
95 patool list <archive>...
96
97 List files in archives.
98
99 create
100 patool create <archive> <file-or-directory>...
101
102 Create an archive from given files. All of the given files to add to
103 the archive must be readable by the current user. The format of the
104 archive to create is determined by the archive file extension. If the
105 archive program has options to maximize file compression, patool uses
106 those options.
107
108 test
109 patool test <archive>...
110
111 Test the given archives. If the helper application does not support
112 testing, the archive contents are listed instead.
113
114 diff
115 patool diff <archive1> <archive2>
116
117 Show differences between two archives with the diff(1) program. The
118 diff options used are -urN.
119
120 search
121 patool search <pattern> <archive>
122
123 Search in archive contents for given pattern using the grep(1) program.
124 The grep options used are -r; additional options can be supplied with
125 the GREP_OPTIONS environment variable.
126
127 repack
128 patool repack <archive> <archive_new>
129
130 Repackage archive to a different format. The target archive format is
131 determined by the file extension of archive_new.
132
133 recompress
134 patool recompress <archive>
135
136 Recompress archive to a smaller file size. If the resulting file is not
137 smaller, the archive is left unchanged.
138
139 formats
140 patool formats
141
142 Show all supported archive formats (ie. which helper applications are
143 available).
144
146 Specifying the help option displays help for patool itself, or a com‐
147 mand.
148 For example:
149 patool --help - display help for patool
150 patool extract --help - display help for the extract command
151
153 When running under a Unix shell the following aliases can be defined to
154 save some typing:
155 alias pl='patool list'
156 alias px='patool extract'
157 alias pc='patool create'
158 alias pd='patool diff'
159
161 Bastian Kleineidam <bastian.kleineidam@web.de>
162
164 Copyright © 2010-2016 Bastian Kleineidam
165
166
167
168patool July 2013 PATOOL(1)