1
0
Fork 0

Adding upstream version 0.8.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-24 05:01:08 +01:00
parent 7877117516
commit 056171c0b2
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
32 changed files with 3798 additions and 1551 deletions

View file

@ -1,25 +1,22 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
.TH ZCAT "1" "December 2009" "Zcat (zutils) 0.8-rc1" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
.TH ZCAT "1" "November 2010" "Zcat (zutils) 0.8" "User Commands"
.SH NAME
Zcat \- concatenate compressed files to stdout
Zcat \- decompress and concatenate files to standard output
.SH SYNOPSIS
.B zcat
[\fIOPTIONS\fR] [\fICAT_OPTIONS\fR] [\fIFILES\fR]
[\fIoptions\fR] [\fIfiles\fR]
.SH DESCRIPTION
Zcat \- Cat wrapper for compressed files.
.PP
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
given file does not exist, zcat tries the compressed file names
Zcat copies each given file ("\-" means standard input), to standard
output. If any given file is compressed, its uncompressed content is
used. If a given file does not exist, and its name does not end with one
of the known extensions, zcat tries the compressed file names
corresponding to the supported compressors. If no files are specified,
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.
standard output. Data read from standard input must be of the same type;
all uncompressed or all compressed with the same compressor.
The supported compressors are bzip2, gzip, lzip and xz.
.PP
CAT_OPTIONS are passed directly to cat.
The exit status from cat is preserved.
Exit status is 0 if no errors occurred, 1 otherwise.
.SH OPTIONS
.TP
\fB\-h\fR, \fB\-\-help\fR
@ -28,12 +25,48 @@ display this help and exit
\fB\-V\fR, \fB\-\-version\fR
output version information and exit
.TP
\fB\-A\fR, \fB\-\-show\-all\fR
equivalent to `\-vET'
.TP
\fB\-b\fR, \fB\-\-number\-nonblank\fR
number nonblank output lines
.TP
\fB\-e\fR
equivalent to `\-vE'
.TP
\fB\-E\fR, \fB\-\-show\-ends\fR
display `$' at end of each line
.TP
\fB\-n\fR, \fB\-\-number\fR
number all output lines
.TP
\fB\-q\fR, \fB\-\-quiet\fR
suppress all messages
.TP
\fB\-r\fR, \fB\-\-recursive\fR
operate recursively on directories
.TP
\fB\-s\fR, \fB\-\-squeeze\-blank\fR
never more than one single blank line
.TP
\fB\-t\fR
equivalent to `\-vT'
.TP
\fB\-T\fR, \fB\-\-show\-tabs\fR
display TAB characters as `^I'
.TP
\fB\-v\fR, \fB\-\-show\-nonprinting\fR
use `^' and `M\-' notation, except for LF and TAB
.TP
\fB\-\-verbose\fR
verbose mode (show error messages)
.SH "REPORTING BUGS"
Report bugs to zutils\-bug@nongnu.org
.br
Zutils home page: http://www.nongnu.org/zutils/zutils.html
.SH COPYRIGHT
Copyright \(co 2009 Antonio Diaz Diaz.
This script is free software: you have unlimited permission
to copy, distribute and modify it.
Copyright \(co 2010 Antonio Diaz Diaz.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
.br
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

67
doc/zcmp.1 Normal file
View file

@ -0,0 +1,67 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
.TH ZCMP "1" "November 2010" "Zcmp (zutils) 0.8" "User Commands"
.SH NAME
Zcmp \- decompress and compare two files byte by byte
.SH SYNOPSIS
.B zcmp
[\fIoptions\fR] \fIfile1 \fR[\fIfile2\fR]
.SH DESCRIPTION
Zcmp compares two files ("\-" means standard input), and if they
differ, tells the first byte and line number where they differ. Bytes
and lines are numbered starting with 1. If any given file is compressed,
its uncompressed content is used. Compressed files are uncompressed on
the fly; no temporary files are created.
The supported compressors are bzip2, gzip, lzip and xz.
.PP
Compares <file1> to <file2>. If <file2> is omitted zcmp tries the
following:
If <file1> is compressed, compares <file1> to the file with the
corresponding decompressed file name (removes the extension from
<file1>).
If <file1> is not compressed, compares <file1> to the uncompressed
contents of <file1>.[bz2|gz|lz|xz] (the first one that is found).
If no suitable file is found, compares <file1> to data read from
standard input.
.PP
Exit status is 0 if inputs are identical, 1 if different, 2 if trouble.
.SH OPTIONS
.TP
\fB\-h\fR, \fB\-\-help\fR
display this help and exit
.TP
\fB\-V\fR, \fB\-\-version\fR
output version information and exit
.TP
\fB\-b\fR, \fB\-\-print\-bytes\fR
print differing bytes
.TP
\fB\-i\fR, \fB\-\-ignore\-initial=\fR<n>[,<n2>]
ignore differences in the first <n> bytes
.TP
\fB\-l\fR, \fB\-\-list\fR
list position, value of all differing bytes
.TP
\fB\-n\fR, \fB\-\-bytes=\fR<n>
compare at most <n> bytes
.TP
\fB\-q\fR, \fB\-\-quiet\fR
suppress all messages
.TP
\fB\-s\fR, \fB\-\-silent\fR
(same as \fB\-\-quiet\fR)
.TP
\fB\-v\fR, \fB\-\-verbose\fR
verbose mode (same as \fB\-\-list\fR)
.PP
Numbers may be followed by a multiplier: k = kB = 10^3 = 1000,
Ki = KiB = 2^10 = 1024, M = 10^6, Mi = 2^20, G = 10^9, Gi = 2^30, etc...
.SH "REPORTING BUGS"
Report bugs to zutils\-bug@nongnu.org
.br
Zutils home page: http://www.nongnu.org/zutils/zutils.html
.SH COPYRIGHT
Copyright \(co 2010 Antonio Diaz Diaz.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
.br
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

View file

@ -1,27 +1,29 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
.TH ZDIFF "1" "December 2009" "Zdiff (zutils) 0.8-rc1" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
.TH ZDIFF "1" "November 2010" "Zdiff (zutils) 0.8" "User Commands"
.SH NAME
Zdiff \- compare compressed files
Zdiff \- decompress and compare two files line by line
.SH SYNOPSIS
.B zdiff
[\fIOPTIONS\fR] [\fIDIFF_OPTIONS\fR] \fIFILE1 \fR[\fIFILE2\fR]
[\fIoptions\fR] \fIfile1 \fR[\fIfile2\fR]
.SH DESCRIPTION
Zdiff \- Diff/cmp wrapper for compressed files.
Zdiff compares two files ("\-" means standard input), and if they
differ, shows the differences line by line. If any given file is
compressed, its uncompressed content is used. Zdiff is a front end to
the diff program and has the limitation that messages from diff refer to
temporary filenames instead of those specified.
The supported compressors are bzip2, gzip, lzip and xz.
.PP
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
content is used. The supported compressors are bzip2, gzip, lzip and xz.
Compares <file1> to <file2>. If <file2> is omitted zdiff tries the
following:
If <file1> is compressed, compares <file1> to the file with the
corresponding decompressed file name (removes the extension from
<file1>).
If <file1> is not compressed, compares <file1> to the uncompressed
contents of <file1>.[bz2|gz|lz|xz] (the first one that is found).
If no suitable file is found, compares <file1> to data read from
standard input.
.PP
Zcmp is a shortcut for "zdiff \fB\-\-cmp\fR"
.PP
Compares FILE1 to FILE2. If FILE2 is omitted and FILE1 is compressed,
compares FILE1 to the file with the corresponding decompressed file
name (removes the extension from FILE1). If FILE2 is omitted and FILE1
is not compressed, compares FILE1 to the uncompressed contents of
FILE1.[bz2|gz|lz|xz] (the first one that is found).
DIFF_OPTIONS are passed directly to diff or cmp.
The exit status from diff or cmp is preserved.
Exit status is 0 if inputs are identical, 1 if different, 2 if trouble.
.SH OPTIONS
.TP
\fB\-h\fR, \fB\-\-help\fR
@ -30,15 +32,63 @@ display this help and exit
\fB\-V\fR, \fB\-\-version\fR
output version information and exit
.TP
\fB\-\-diff\fR
use diff to compare files (default)
\fB\-a\fR, \fB\-\-text\fR
treat all files as text
.TP
\fB\-\-cmp\fR
use cmp to compare files
\fB\-b\fR, \fB\-\-ignore\-space\-change\fR
ignore changes in the amount of white space
.TP
\fB\-B\fR, \fB\-\-ignore\-blank\-lines\fR
ignore changes whose lines are all blank
.TP
\fB\-c\fR
use the context output format
.TP
\fB\-C\fR, \fB\-\-context=\fR<n>
same as \fB\-c\fR but use <n> lines of context
.TP
\fB\-d\fR, \fB\-\-minimal\fR
try hard to find a smaller set of changes
.TP
\fB\-E\fR, \fB\-\-ignore\-tab\-expansion\fR
ignore changes due to tab expansion
.TP
\fB\-i\fR, \fB\-\-ignore\-case\fR
ignore case differences in file contents
.TP
\fB\-p\fR, \fB\-\-show\-c\-function\fR
show which C function each change is in
.TP
\fB\-q\fR, \fB\-\-brief\fR
output only whether files differ
.TP
\fB\-s\fR, \fB\-\-report\-identical\-files\fR
report when two files are identical
.TP
\fB\-t\fR, \fB\-\-expand\-tabs\fR
expand tabs to spaces in output
.TP
\fB\-T\fR, \fB\-\-initial\-tab\fR
make tabs line up by prepending a tab
.TP
\fB\-u\fR
use the unified output format
.TP
\fB\-U\fR, \fB\-\-unified=\fR<n>
same as \fB\-u\fR but use <n> lines of context
.TP
\fB\-w\fR, \fB\-\-ignore\-all\-space\fR
ignore all white space
.PP
Numbers may be followed by a multiplier: k = kB = 10^3 = 1000,
Ki = KiB = 2^10 = 1024, M = 10^6, Mi = 2^20, G = 10^9, Gi = 2^30, etc...
.SH "REPORTING BUGS"
Report bugs to zutils\-bug@nongnu.org
.br
Zutils home page: http://www.nongnu.org/zutils/zutils.html
.SH COPYRIGHT
Copyright \(co 2009 Antonio Diaz Diaz.
This script is free software: you have unlimited permission
to copy, distribute and modify it.
Copyright \(co 2010 Antonio Diaz Diaz.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
.br
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

View file

@ -1,39 +1,115 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
.TH ZGREP "1" "December 2009" "Zgrep (zutils) 0.8-rc1" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
.TH ZGREP "1" "November 2010" "Zgrep (zutils) 0.8" "User Commands"
.SH NAME
Zgrep \- search compressed files for a regular expression
.SH SYNOPSIS
.B zgrep
[\fIOPTIONS\fR] [\fIGREP_OPTIONS\fR] \fIPATTERN \fR[\fIFILES\fR]
[\fIoptions\fR] \fI<pattern> \fR[\fIfiles\fR]
.SH DESCRIPTION
Zgrep \- Grep wrapper for compressed files.
.PP
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
names corresponding to the supported compressors. If no files are
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.
Zgrep is a front end to the grep program 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, and its name does not end with one of the known
extensions, zgrep tries the compressed file names corresponding to the
supported compressors. If no files are 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.
The supported compressors are bzip2, gzip, lzip and xz.
.PP
Zegrep is a shortcut for "zgrep \fB\-E\fR"
Zfgrep is a shortcut for "zgrep \fB\-F\fR"
.PP
GREP_OPTIONS are passed directly to grep.
The exit status from grep is preserved.
Exit status is 0 if match, 1 if no match, 2 if trouble.
.SH OPTIONS
.TP
\fB\-h\fR, \fB\-\-help\fR
\fB\-\-help\fR
display this help and exit
.TP
\fB\-V\fR, \fB\-\-version\fR
output version information and exit
.TP
\fB\-a\fR, \fB\-\-text\fR
treat all files as text
.TP
\fB\-A\fR, \fB\-\-after\-context=\fR<n>
print <n> lines of trailing context
.TP
\fB\-b\fR, \fB\-\-byte\-offset\fR
print the byte offset of each line
.TP
\fB\-B\fR, \fB\-\-before\-context=\fR<n>
print <n> lines of leading context
.TP
\fB\-c\fR, \fB\-\-count\fR
only print a count of matching lines per file
.TP
\fB\-C\fR, \fB\-\-context=\fR<n>
print <n> lines of output context
.TP
\fB\-e\fR, \fB\-\-regexp=\fR<pattern>
use <pattern> as the pattern to match
.TP
\fB\-E\fR, \fB\-\-extended\-regexp\fR
<pattern> is an extended regular expression
.TP
\fB\-f\fR, \fB\-\-file=\fR<file>
obtain patterns from <file>
.TP
\fB\-F\fR, \fB\-\-fixed\-strings\fR
<pattern> is a set of newline\-separated strings
.TP
\fB\-h\fR, \fB\-\-no\-filename\fR
suppress the prefixing filename on output
.TP
\fB\-H\fR, \fB\-\-with\-filename\fR
print the filename for each match
.TP
\fB\-i\fR, \fB\-\-ignore\-case\fR
ignore case distinctions
.TP
\fB\-I\fR
ignore binary files
.TP
\fB\-l\fR, \fB\-\-files\-with\-matches\fR
only print names of files containing matches
.TP
\fB\-L\fR, \fB\-\-files\-without\-match\fR
only print names of files containing no matches
.TP
\fB\-m\fR, \fB\-\-max\-count=\fR<n>
stop after <n> matches
.TP
\fB\-n\fR, \fB\-\-line\-number\fR
print the line number of each line
.TP
\fB\-o\fR, \fB\-\-only\-matching\fR
show only the part of a line matching <pattern>
.TP
\fB\-q\fR, \fB\-\-quiet\fR
suppress all messages
.TP
\fB\-r\fR, \fB\-\-recursive\fR
operate recursively on directories
.TP
\fB\-s\fR, \fB\-\-no\-messages\fR
suppress error messages
.TP
\fB\-v\fR, \fB\-\-invert\-match\fR
select non\-matching lines
.TP
\fB\-\-verbose\fR
verbose mode (show error messages)
.TP
\fB\-w\fR, \fB\-\-word\-regexp\fR
match only whole words
.TP
\fB\-x\fR, \fB\-\-line\-regexp\fR
match only whole lines
.SH "REPORTING BUGS"
Report bugs to zutils\-bug@nongnu.org
.br
Zutils home page: http://www.nongnu.org/zutils/zutils.html
.SH COPYRIGHT
Copyright \(co 2009 Antonio Diaz Diaz.
This script is free software: you have unlimited permission
to copy, distribute and modify it.
Copyright \(co 2010 Antonio Diaz Diaz.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
.br
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

View file

@ -1,20 +1,18 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
.TH ZTEST "1" "December 2009" "Ztest (zutils) 0.8-rc1" "User Commands"
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
.TH ZTEST "1" "November 2010" "Ztest (zutils) 0.8" "User Commands"
.SH NAME
Ztest \- verify integrity of compressed files
.SH SYNOPSIS
.B ztest
[\fIOPTIONS\fR] [\fIFILES\fR]
[\fIoptions\fR] [\fIfiles\fR]
.SH DESCRIPTION
Ztest \- Test integrity of compressed files.
.PP
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 supported compressors are bzip2, gzip, lzip and xz.
.PP
The exit status is 1 if any compressed file is corrupt, 0 otherwise.
Exit status is 2 if any compressed file is corrupt, 0 otherwise.
.SH OPTIONS
.TP
\fB\-h\fR, \fB\-\-help\fR
@ -33,8 +31,11 @@ operate recursively on directories
be verbose (a 2nd \fB\-v\fR gives more)
.SH "REPORTING BUGS"
Report bugs to zutils\-bug@nongnu.org
.br
Zutils home page: http://www.nongnu.org/zutils/zutils.html
.SH COPYRIGHT
Copyright \(co 2009 Antonio Diaz Diaz.
This script is free software: you have unlimited permission
to copy, distribute and modify it.
Copyright \(co 2010 Antonio Diaz Diaz.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
.br
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Binary file not shown.

View file

@ -5,8 +5,8 @@
@finalout
@c %**end of header
@set UPDATED 1 December 2009
@set VERSION 0.8-rc1
@set UPDATED 15 November 2010
@set VERSION 0.8
@dircategory Data Compression
@direntry
@ -24,7 +24,9 @@
@vskip 0pt plus 1filll
@end titlepage
@ifnothtml
@contents
@end ifnothtml
@node Top
@top
@ -32,17 +34,18 @@
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
* Ztest:: Testing integrity of compressed files
* Problems:: Reporting bugs
* Concept Index:: Index of concepts
* Introduction:: Purpose and features of zutils
* Zcat:: Concatenating compressed files
* Zcmp:: Comparing compressed files byte by byte
* Zdiff:: Comparing compressed files line by line
* Zgrep:: Searching inside compressed files
* Ztest:: Testing integrity of compressed files
* Problems:: Reporting bugs
* Concept Index:: Index of concepts
@end menu
@sp 1
Copyright @copyright{} 2008, 2009 Antonio Diaz Diaz.
Copyright @copyright{} 2008, 2009, 2010 Antonio Diaz Diaz.
This manual is free documentation: you have unlimited permission
to copy, distribute and modify it.
@ -52,148 +55,443 @@ to copy, distribute and modify it.
@chapter Introduction
@cindex introduction
Zutils is a collection of utilities for dealing with any combination of
compressed and non-compressed files transparently. The supported
compressors are bzip2, gzip, lzip and xz.
Zutils is a collection of utilities able to deal with any combination of
compressed and non-compressed files transparently. If any given file,
including standard input, is compressed, its uncompressed content is
used. Compressed files are decompressed on the fly; no temporary files
are created. These utilities are not wrapper scripts but safer and more
efficient C++ programs. In particular the @samp{--recursive} option is
very efficient in those utilities supporting it.
The currently provided utilities are zcat, zcmp, zdiff, zegrep, zfgrep,
zgrep and ztest.
@noindent
The provided utilities are zcat, zcmp, zdiff, zgrep and ztest.@*
The supported compressors are bzip2, gzip, lzip and xz.
@sp 1
Numbers given as arguments to options (positions, sizes) may be followed
by a multiplier and an optional @samp{B} for "byte".
Table of SI and binary prefixes (unit multipliers):
@multitable {Prefix} {kilobyte (10^3 = 1000)} {|} {Prefix} {kibibyte (2^10 = 1024)}
@item Prefix @tab Value @tab | @tab Prefix @tab Value
@item k @tab kilobyte (10^3 = 1000) @tab | @tab Ki @tab kibibyte (2^10 = 1024)
@item M @tab megabyte (10^6) @tab | @tab Mi @tab mebibyte (2^20)
@item G @tab gigabyte (10^9) @tab | @tab Gi @tab gibibyte (2^30)
@item T @tab terabyte (10^12) @tab | @tab Ti @tab tebibyte (2^40)
@item P @tab petabyte (10^15) @tab | @tab Pi @tab pebibyte (2^50)
@item E @tab exabyte (10^18) @tab | @tab Ei @tab exbibyte (2^60)
@item Z @tab zettabyte (10^21) @tab | @tab Zi @tab zebibyte (2^70)
@item Y @tab yottabyte (10^24) @tab | @tab Yi @tab yobibyte (2^80)
@end multitable
@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
given file does not exist, zcat tries the compressed file names
Zcat copies each given file (@samp{-} means standard input), to standard
output. If any given file is compressed, its uncompressed content is
used. If a given file does not exist, and its name does not end with one
of the known extensions, zcat tries the compressed file names
corresponding to the supported compressors. If no files are specified,
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.
standard output. Data read from standard input must be of the same type;
all uncompressed or all compressed with the same compressor.
The format for running zcat is:
@example
zcat [@var{options}] [@var{cat_options}] [@var{files}]
zcat [@var{options}] [@var{files}]
@end example
@noindent
@var{cat_options} are passed directly to cat. The exit status from cat
is preserved.
Exit status is 0 if no errors occurred, 1 otherwise.
Zcat supports the following options:
@table @samp
@item --help
@itemx -h
@item -h
@itemx --help
Print an informative help message describing the options and exit.
@item --version
@itemx -V
@item -V
@itemx --version
Print the version number of zcat on the standard output and exit.
@item --recursive
@itemx -r
@item -A
@itemx --show-all
Equivalent to @samp{-vET}.
@item -b
@itemx --number-nonblank
Number all nonblank output lines, starting with 1. The line count is
unlimited.
@item -e
Equivalent to @samp{-vE}.
@item -E
@itemx --show-ends
Print a @samp{$} after the end of each line.
@item -n
@itemx --number
Number all output lines, starting with 1. The line count is unlimited.
@item -q
@itemx --quiet
Quiet operation. Suppress all messages.
@item -r
@itemx --recursive
Operate recursively on directories.
@item -s
@itemx --squeeze-blank
Replace multiple adjacent blank lines with a single blank line.
@item -t
Equivalent to @samp{-vT}.
@item -T
@itemx --show-tabs
Print TAB characters as @samp{^I}.
@item -v
@itemx --show-nonprinting
Print control characters except for LF (newline) and TAB using @samp{^}
notation and precede characters larger than 127 with @samp{M-} (which
stands for "meta").
@item --verbose
Verbose mode. Show error messages.
@end table
@node Zcmp/Zdiff
@chapter Zcmp/Zdiff
@node Zcmp
@chapter Zcmp
@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
content is used.
Zcmp compares two files (@samp{-} means standard input), and if they
differ, tells the first byte and line number where they differ. Bytes
and lines are numbered starting with 1. If any given file is compressed,
its uncompressed content is used. Compressed files are decompressed on
the fly; no temporary files are created.
The format for running zcmp is:
@example
zcmp [@var{options}] @var{file1} [@var{file2}]
@end example
@noindent
Zcmp is a shortcut for @samp{zdiff --cmp}
Compares @var{file1} to @var{file2}. If @var{file2} is omitted zcmp
tries the following:@*
If @var{file1} is compressed, compares @var{file1} to the file with the
corresponding decompressed file name (removes the extension from
@var{file1}).@*
If @var{file1} is not compressed, compares @var{file1} to the
uncompressed contents of @var{file1}.[bz2|gz|lz|xz] (the first one that
is found).@*
If no suitable file is found, compares @var{file1} to data read from
standard input.
@noindent
An exit status of 0 means no differences were found, 1 means some
differences were found, and 2 means trouble.
Zcmp supports the following options:
@table @samp
@item -h
@itemx --help
Print an informative help message describing the options and exit.
@item -V
@itemx --version
Print the version number of zcmp on the standard output and exit.
@item -b
@itemx --print-bytes
Print the differing bytes. Print control bytes as a @samp{^} followed by
a letter, and precede bytes larger than 127 with @samp{M-} (which stands
for "meta").
@item -i @var{size}
@itemx --ignore-initial=@var{size}
Ignore any differences in the first @var{size} bytes of the input files.
Treat files with fewer than @var{size} bytes as if they were empty. If
@var{size} is in the form @samp{@var{size1},@var{size2}}, ignore the
first @var{size1} bytes of the first input file and the first
@var{size2} bytes of the second input file.
@item -l
@itemx -v
@itemx --list
@itemx --verbose
Print the byte numbers (in decimal) and values (in octal) of all
differing bytes.
@item -n @var{count}
@itemx --bytes=@var{count}
Compare at most @var{count} input bytes.
@item -q
@itemx -s
@itemx --quiet
@itemx --silent
Do not print anything; only return an exit status indicating whether the
files differ.
@end table
@node Zdiff
@chapter Zdiff
@cindex zdiff
Zdiff compares two files (@samp{-} means standard input), and if they
differ, shows the differences line by line. If any given file is
compressed, its uncompressed content is used. Zdiff is a front end to
the diff program and has the limitation that messages from diff refer to
temporary filenames instead of those specified.
The format for running zdiff is:
@example
zdiff [@var{options}] [@var{diff_options}] @var{file1} [@var{file2}]
zdiff [@var{options}] @var{file1} [@var{file2}]
@end example
@noindent
Compares @var{file1} to @var{file2}. If @var{file2} is omitted and
@var{file1} is compressed, compares @var{file1} to the file with the
Compares @var{file1} to @var{file2}. If @var{file2} is omitted zdiff
tries the following:@*
If @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
@var{file1}.[bz2|gz|lz|xz] (the first one that is found).
@var{diff_options} are passed directly to diff or cmp. The exit status
from diff or cmp is preserved.
@var{file1}).@*
If @var{file1} is not compressed, compares @var{file1} to the
uncompressed contents of @var{file1}.[bz2|gz|lz|xz] (the first one that
is found).@*
If no suitable file is found, compares @var{file1} to data read from
standard input.
@noindent
An exit status of 0 means no differences were found, 1 means some
differences were found, and 2 means trouble.
Zdiff supports the following options:
@table @samp
@item --help
@itemx -h
@item -h
@itemx --help
Print an informative help message describing the options and exit.
@item --version
@itemx -V
@item -V
@itemx --version
Print the version number of zdiff on the standard output and exit.
@item --diff
Use diff to compare files (default).
@item -a
@itemx --text
Treat all files as text.
@item --cmp
Use cmp to compare files.
@item -b
@itemx --ignore-space-change
Ignore changes in the amount of white space.
@item -B
@itemx --ignore-blank-lines
Ignore changes whose lines are all blank.
@itemx -c
Use the context output format.
@item -C @var{n}
@itemx --context=@var{n}
Same as -c but use @var{n} lines of context.
@item -d
@itemx --minimal
Try hard to find a smaller set of changes.
@item -E
@itemx --ignore-tab-expansion
Ignore changes due to tab expansion.
@item -i
@itemx --ignore-case
Ignore case differences in file contents.
@item -p
@itemx --show-c-function
Show which C function each change is in.
@item -q
@itemx --brief
Output only whether files differ.
@item -s
@itemx --report-identical-files
Report when two files are identical.
@item -t
@itemx --expand-tabs
Expand tabs to spaces in output.
@item -T
@itemx --initial-tab
Make tabs line up by prepending a tab.
@item -u
Use the unified output format.
@item -U @var{n}
@itemx --unified=@var{n}
Same as -u but use @var{n} lines of context.
@item -w
@itemx --ignore-all-space
Ignore all white space.
@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
@cindex zegrep
@cindex zfgrep
@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
names corresponding to the supported compressors. If no files are
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.
@noindent
Zegrep is a shortcut for @samp{zgrep -E}@*
Zfgrep is a shortcut for @samp{zgrep -F}
Zgrep is a front end to the grep program 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, and its name does not end with one of the known
extensions, zgrep tries the compressed file names corresponding to the
supported compressors. If no files are 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.
The format for running zgrep is:
@example
zgrep [@var{options}] [@var{grep_options}] @var{pattern} [@var{files}]
zgrep [@var{options}] @var{pattern} [@var{files}]
@end example
@noindent
@var{grep_options} are passed directly to grep. The exit status from
grep is preserved.
An exit status of 0 means at least one match was found, 1 means no
matches were found, and 2 means trouble.
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
@item -V
@itemx --version
Print the version number of zgrep on the standard output and exit.
@item -a
@itemx --text
Treat all files as text.
@item -A @var{n}
@itemx --after-context=@var{n}
Print @var{n} lines of trailing context.
@item -b
@itemx --byte-offset
Print the byte offset of each line.
@item -B @var{n}
@itemx --before-context=@var{n}
Print @var{n} lines of leading context.
@item -c
@itemx --count
Only print a count of matching lines per file.
@item -C @var{n}
@itemx --context=@var{n}
Print @var{n} lines of output context.
@item -e @var{pattern}
@itemx --regexp=@var{pattern}
Use @var{pattern} as the pattern to match.
@item -E
@itemx --extended-regexp
Treat @var{pattern} as an extended regular expression.
@item -f @var{file}
@itemx --file=@var{file}
Obtain patterns from @var{file}, one per line.
@item -F
@itemx --fixed-strings
Treat @var{pattern} as a set of newline-separated strings.
@item -h
@itemx --no-filename
Suppress the prefixing filename on output.
@item -H
@itemx --with-filename
Print the filename for each match.
@item -i
@itemx --ignore-case
Ignore case distinctions.
@item -I
Ignore binary files.
@item -l
@itemx --files-with-matches
Only print names of files containing at least one match.
@item -L
@itemx --files-without-match
Only print names of files not containing any matches.
@item -m @var{n}
@itemx --max-count=@var{n}
Stop after @var{n} matches.
@item -n
@itemx --line-number
Prefix each matched line with its line number in the input file.
@item -o
@itemx --only-matching
Show only the part of matching lines that actually matches @var{pattern}.
@item -q
@itemx --quiet
Suppress all messages.
@item -r
@itemx --recursive
Operate recursively on directories.
@item -s
@itemx --no-messages
Suppress error messages.
@item -v
@itemx --invert-match
Select non-matching lines.
@item --verbose
Verbose mode. Show error messages.
@item -w
@itemx --word-regexp
Match only whole words.
@item -x
@itemx --line-regexp
Match only whole lines.
@end table
@ -213,29 +511,31 @@ ztest [@var{options}] [@var{files}]
@end example
@noindent
The exit status is 0 if all files verify OK, 1 otherwise.
The exit status is 0 if all files verify OK, 1 for environmental
problems (file not found, invalid flags, I/O errors, etc), 2 to indicate
a corrupt or invalid input file.
Ztest supports the following options:
@table @samp
@item --help
@itemx -h
@item -h
@itemx --help
Print an informative help message describing the options and exit.
@item --version
@itemx -V
@item -V
@itemx --version
Print the version number of ztest on the standard output and exit.
@item --quiet
@itemx -q
@item -q
@itemx --quiet
Quiet operation. Suppress all messages.
@item --recursive
@itemx -r
@item -r
@itemx --recursive
Operate recursively on directories.
@item --verbose
@itemx -v
@item -v
@itemx --verbose
Verbose mode. Show the verify status for each file processed.
Further -v's increase the verbosity level.
@ -254,7 +554,7 @@ for all eternity, if not longer.
If you find a bug in zutils, please send electronic mail to
@email{zutils-bug@@nongnu.org}. Include the version number, which you can
find by running @w{@samp{zdiff --version}}.
find by running @w{@samp{zutils --version}}.
@node Concept Index