2025-02-24 04:42:45 +01:00
|
|
|
\input texinfo @c -*-texinfo-*-
|
|
|
|
@c %**start of header
|
|
|
|
@setfilename zutils.info
|
2025-02-24 04:58:36 +01:00
|
|
|
@settitle Zutils Manual
|
2025-02-24 04:42:45 +01:00
|
|
|
@finalout
|
|
|
|
@c %**end of header
|
|
|
|
|
2025-02-24 04:59:04 +01:00
|
|
|
@set UPDATED 1 December 2009
|
|
|
|
@set VERSION 0.8-rc1
|
2025-02-24 04:42:45 +01:00
|
|
|
|
|
|
|
@dircategory Data Compression
|
|
|
|
@direntry
|
|
|
|
* Zutils: (zutils). Utilities dealing with compressed files
|
|
|
|
@end direntry
|
|
|
|
|
|
|
|
|
|
|
|
@titlepage
|
|
|
|
@title Zutils
|
|
|
|
@subtitle Utilities dealing with compressed files
|
|
|
|
@subtitle for Zutils version @value{VERSION}, @value{UPDATED}
|
|
|
|
@author by Antonio Diaz Diaz
|
|
|
|
|
|
|
|
@page
|
|
|
|
@vskip 0pt plus 1filll
|
|
|
|
@end titlepage
|
|
|
|
|
|
|
|
@contents
|
|
|
|
|
|
|
|
@node Top
|
|
|
|
@top
|
|
|
|
|
|
|
|
This manual is for Zutils (version @value{VERSION}, @value{UPDATED}).
|
|
|
|
|
|
|
|
@menu
|
|
|
|
* Introduction:: Purpose and features of zutils
|
|
|
|
* Zcat:: Concatenating compressed files
|
|
|
|
* Zcmp/Zdiff:: Comparing compressed files
|
|
|
|
* Zgrep:: Searching inside compressed files
|
2025-02-24 04:58:36 +01:00
|
|
|
* Ztest:: Testing integrity of compressed files
|
2025-02-24 04:42:45 +01:00
|
|
|
* Problems:: Reporting bugs
|
|
|
|
* Concept Index:: Index of concepts
|
|
|
|
@end menu
|
|
|
|
|
|
|
|
@sp 1
|
|
|
|
Copyright @copyright{} 2008, 2009 Antonio Diaz Diaz.
|
|
|
|
|
|
|
|
This manual is free documentation: you have unlimited permission
|
|
|
|
to copy, distribute and modify it.
|
|
|
|
|
|
|
|
|
|
|
|
@node Introduction
|
|
|
|
@chapter Introduction
|
|
|
|
@cindex introduction
|
|
|
|
|
|
|
|
Zutils is a collection of utilities for dealing with any combination of
|
|
|
|
compressed and non-compressed files transparently. The supported
|
2025-02-24 04:58:36 +01:00
|
|
|
compressors are bzip2, gzip, lzip and xz.
|
2025-02-24 04:42:45 +01:00
|
|
|
|
2025-02-24 04:58:36 +01:00
|
|
|
The currently provided utilities are zcat, zcmp, zdiff, zegrep, zfgrep,
|
|
|
|
zgrep and ztest.
|
2025-02-24 04:42:45 +01:00
|
|
|
|
|
|
|
|
|
|
|
@node Zcat
|
|
|
|
@chapter Zcat
|
|
|
|
@cindex zcat
|
|
|
|
|
|
|
|
Zcat is a wrapper script around the cat command that allows transparent
|
|
|
|
concatenation of any combination of compressed and non-compressed files.
|
|
|
|
If any given file is compressed, its uncompressed content is used. If a
|
2025-02-24 04:44:01 +01:00
|
|
|
given file does not exist, zcat tries the compressed file names
|
2025-02-24 04:57:21 +01:00
|
|
|
corresponding to the supported compressors. If no files are specified,
|
2025-02-24 04:57:56 +01:00
|
|
|
data is read from standard input, decompressed if needed, and sent to
|
|
|
|
stdout. Data read from standard input must be of the same type; all
|
|
|
|
uncompressed or all compressed with the same compressor.
|
2025-02-24 04:42:45 +01:00
|
|
|
|
|
|
|
The format for running zcat is:
|
|
|
|
|
|
|
|
@example
|
|
|
|
zcat [@var{options}] [@var{cat_options}] [@var{files}]
|
|
|
|
@end example
|
|
|
|
|
|
|
|
@noindent
|
|
|
|
@var{cat_options} are passed directly to cat. The exit status from cat
|
|
|
|
is preserved.
|
|
|
|
|
|
|
|
Zcat supports the following options:
|
|
|
|
|
|
|
|
@table @samp
|
|
|
|
@item --help
|
|
|
|
@itemx -h
|
|
|
|
Print an informative help message describing the options and exit.
|
|
|
|
|
|
|
|
@item --version
|
|
|
|
@itemx -V
|
|
|
|
Print the version number of zcat on the standard output and exit.
|
|
|
|
|
2025-02-24 04:58:36 +01:00
|
|
|
@item --recursive
|
|
|
|
@itemx -r
|
|
|
|
Operate recursively on directories.
|
|
|
|
|
2025-02-24 04:42:45 +01:00
|
|
|
@end table
|
|
|
|
|
|
|
|
|
|
|
|
@node Zcmp/Zdiff
|
|
|
|
@chapter Zcmp/Zdiff
|
|
|
|
@cindex zcmp
|
|
|
|
@cindex zdiff
|
|
|
|
|
|
|
|
Zdiff is a wrapper script around the diff and cmp commands that allows
|
|
|
|
transparent comparison of any combination of compressed and
|
|
|
|
non-compressed files. If any given file is compressed, its uncompressed
|
2025-02-24 04:57:21 +01:00
|
|
|
content is used.
|
2025-02-24 04:42:45 +01:00
|
|
|
|
|
|
|
@noindent
|
|
|
|
Zcmp is a shortcut for @samp{zdiff --cmp}
|
|
|
|
|
|
|
|
The format for running zdiff is:
|
|
|
|
|
|
|
|
@example
|
|
|
|
zdiff [@var{options}] [@var{diff_options}] @var{file1} [@var{file2}]
|
|
|
|
@end example
|
|
|
|
|
|
|
|
@noindent
|
2025-02-24 04:44:01 +01:00
|
|
|
Compares @var{file1} to @var{file2}. If @var{file2} is omitted and
|
|
|
|
@var{file1} is compressed, compares @var{file1} to the file with the
|
|
|
|
corresponding decompressed file name (removes the extension from
|
|
|
|
@var{file1}). If @var{file2} is omitted and @var{file1} is not
|
|
|
|
compressed, compares @var{file1} to the uncompressed contents of
|
2025-02-24 04:58:36 +01:00
|
|
|
@var{file1}.[bz2|gz|lz|xz] (the first one that is found).
|
2025-02-24 04:44:01 +01:00
|
|
|
@var{diff_options} are passed directly to diff or cmp. The exit status
|
|
|
|
from diff or cmp is preserved.
|
2025-02-24 04:42:45 +01:00
|
|
|
|
|
|
|
Zdiff supports the following options:
|
|
|
|
|
|
|
|
@table @samp
|
|
|
|
@item --help
|
|
|
|
@itemx -h
|
|
|
|
Print an informative help message describing the options and exit.
|
|
|
|
|
|
|
|
@item --version
|
|
|
|
@itemx -V
|
|
|
|
Print the version number of zdiff on the standard output and exit.
|
|
|
|
|
|
|
|
@item --diff
|
|
|
|
Use diff to compare files (default).
|
|
|
|
|
|
|
|
@item --cmp
|
|
|
|
Use cmp to compare files.
|
|
|
|
|
|
|
|
@end table
|
|
|
|
|
|
|
|
Zdiff has the limitation that messages from the diff or cmp programs
|
|
|
|
refer to temporary filenames instead of those specified.
|
|
|
|
|
|
|
|
|
|
|
|
@node Zgrep
|
|
|
|
@chapter Zgrep
|
2025-02-24 04:51:33 +01:00
|
|
|
@cindex zegrep
|
|
|
|
@cindex zfgrep
|
2025-02-24 04:42:45 +01:00
|
|
|
@cindex zgrep
|
|
|
|
|
|
|
|
Zgrep is a wrapper script around the grep command that allows
|
|
|
|
transparent search on any combination of compressed and non-compressed
|
|
|
|
files. If any given file is compressed, its uncompressed content is
|
|
|
|
used. If a given file does not exist, zgrep tries the compressed file
|
2025-02-24 04:57:21 +01:00
|
|
|
names corresponding to the supported compressors. If no files are
|
2025-02-24 04:57:56 +01:00
|
|
|
specified, data is read from standard input, decompressed if needed, and
|
|
|
|
fed to grep. Data read from standard input must be of the same type; all
|
|
|
|
uncompressed or all compressed with the same compressor.
|
2025-02-24 04:42:45 +01:00
|
|
|
|
2025-02-24 04:51:33 +01:00
|
|
|
@noindent
|
|
|
|
Zegrep is a shortcut for @samp{zgrep -E}@*
|
|
|
|
Zfgrep is a shortcut for @samp{zgrep -F}
|
|
|
|
|
|
|
|
|
2025-02-24 04:42:45 +01:00
|
|
|
The format for running zgrep is:
|
|
|
|
|
|
|
|
@example
|
|
|
|
zgrep [@var{options}] [@var{grep_options}] @var{pattern} [@var{files}]
|
|
|
|
@end example
|
|
|
|
|
|
|
|
@noindent
|
|
|
|
@var{grep_options} are passed directly to grep. The exit status from
|
|
|
|
grep is preserved.
|
|
|
|
|
|
|
|
Zgrep supports the following options:
|
|
|
|
|
|
|
|
@table @samp
|
|
|
|
@item --help
|
|
|
|
@itemx -h
|
|
|
|
Print an informative help message describing the options and exit.
|
|
|
|
|
|
|
|
@item --version
|
|
|
|
@itemx -V
|
|
|
|
Print the version number of zgrep on the standard output and exit.
|
|
|
|
|
|
|
|
@end table
|
|
|
|
|
|
|
|
|
2025-02-24 04:58:36 +01:00
|
|
|
@node Ztest
|
|
|
|
@chapter Ztest
|
|
|
|
@cindex ztest
|
|
|
|
|
|
|
|
Ztest verifies the integrity of the specified compressed files.
|
|
|
|
Non-compressed files are ignored. If no files are specified, the
|
|
|
|
integrity of compressed data read from standard input is verified. Data
|
|
|
|
read from standard input must be all compressed with the same compressor.
|
|
|
|
|
|
|
|
The format for running ztest is:
|
|
|
|
|
|
|
|
@example
|
|
|
|
ztest [@var{options}] [@var{files}]
|
|
|
|
@end example
|
|
|
|
|
|
|
|
@noindent
|
|
|
|
The exit status is 0 if all files verify OK, 1 otherwise.
|
|
|
|
|
|
|
|
Ztest supports the following options:
|
|
|
|
|
|
|
|
@table @samp
|
|
|
|
@item --help
|
|
|
|
@itemx -h
|
|
|
|
Print an informative help message describing the options and exit.
|
|
|
|
|
|
|
|
@item --version
|
|
|
|
@itemx -V
|
|
|
|
Print the version number of ztest on the standard output and exit.
|
|
|
|
|
|
|
|
@item --quiet
|
|
|
|
@itemx -q
|
|
|
|
Quiet operation. Suppress all messages.
|
|
|
|
|
|
|
|
@item --recursive
|
|
|
|
@itemx -r
|
|
|
|
Operate recursively on directories.
|
|
|
|
|
|
|
|
@item --verbose
|
|
|
|
@itemx -v
|
|
|
|
Verbose mode. Show the verify status for each file processed.
|
|
|
|
Further -v's increase the verbosity level.
|
|
|
|
|
|
|
|
@end table
|
|
|
|
|
|
|
|
|
2025-02-24 04:42:45 +01:00
|
|
|
@node Problems
|
|
|
|
@chapter Reporting Bugs
|
|
|
|
@cindex bugs
|
|
|
|
@cindex getting help
|
|
|
|
|
|
|
|
There are probably bugs in zutils. There are certainly errors and
|
|
|
|
omissions in this manual. If you report them, they will get fixed. If
|
|
|
|
you don't, no one will ever know about them and they will remain unfixed
|
|
|
|
for all eternity, if not longer.
|
|
|
|
|
|
|
|
If you find a bug in zutils, please send electronic mail to
|
2025-02-24 04:44:01 +01:00
|
|
|
@email{zutils-bug@@nongnu.org}. Include the version number, which you can
|
2025-02-24 04:42:45 +01:00
|
|
|
find by running @w{@samp{zdiff --version}}.
|
|
|
|
|
|
|
|
|
|
|
|
@node Concept Index
|
|
|
|
@unnumbered Concept Index
|
|
|
|
|
|
|
|
@printindex cp
|
|
|
|
|
|
|
|
@bye
|