1
0
Fork 0

Merging upstream version 1.11.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-24 06:00:56 +01:00
parent ddac2f7869
commit bd6a3e4e88
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
31 changed files with 734 additions and 377 deletions

View file

@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.16.
.TH ZCAT "1" "January 2021" "zutils 1.10" "User Commands"
.TH ZCAT "1" "January 2022" "zutils 1.11" "User Commands"
.SH NAME
zcat \- decompress and concatenate files to standard output
.SH SYNOPSIS
@ -21,7 +21,7 @@ same compressed format.
If no files are specified, recursive searches examine the current
working directory, and nonrecursive searches read standard input.
.PP
The formats supported are bzip2, gzip, lzip, and xz.
The formats supported are bzip2, gzip, lzip, xz, and zstd.
.PP
Exit status is 0 if no errors occurred, 1 otherwise.
.SH OPTIONS
@ -54,7 +54,7 @@ number all output lines
don't read runtime configuration file
.TP
\fB\-O\fR, \fB\-\-force\-format=\fR<fmt>
force the format given (bz2, gz, lz, xz)
force the format given (bz2, gz, lz, xz, zst)
.TP
\fB\-q\fR, \fB\-\-quiet\fR
suppress all messages
@ -91,13 +91,28 @@ set compressor and options for lzip format
.TP
\fB\-\-xz=\fR<command>
set compressor and options for xz format
.TP
\fB\-\-zst=\fR<command>
set compressor and options for zstd format
.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 2021 Antonio Diaz Diaz.
Copyright \(co 2022 Antonio Diaz Diaz.
License GPLv2+: GNU GPL version 2 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.
.SH "SEE ALSO"
The full documentation for
.B zcat
is maintained as a Texinfo manual. If the
.B info
and
.B zcat
programs are properly installed at your site, the command
.IP
.B info zutils
.PP
should give you access to the complete manual.

View file

@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.16.
.TH ZCMP "1" "January 2021" "zutils 1.10" "User Commands"
.TH ZCMP "1" "January 2022" "zutils 1.11" "User Commands"
.SH NAME
zcmp \- decompress and compare two files byte by byte
.SH SYNOPSIS
@ -12,7 +12,7 @@ starting with 1. A hyphen '\-' used as a file argument means standard input.
If any file given is compressed, its decompressed content is used. Compressed
files are decompressed on the fly; no temporary files are created.
.PP
The formats supported are bzip2, gzip, lzip, and xz.
The formats supported are bzip2, gzip, lzip, xz, and zstd.
.PP
zcmp compares file1 to file2. The standard input is used only if file1 or
file2 refers to standard input. If file2 is omitted zcmp tries the
@ -23,7 +23,7 @@ the corresponding uncompressed file (the name of file1 with the
extension removed).
.IP
\- If file1 is uncompressed, compares it with the decompressed
contents of file1.[lz|bz2|gz|xz] (the first one that is found).
contents of file1.[lz|bz2|gz|zst|xz] (the first one that is found).
.PP
Exit status is 0 if inputs are identical, 1 if different, 2 if trouble.
.SH OPTIONS
@ -53,7 +53,7 @@ compare at most <n> bytes
don't read runtime configuration file
.TP
\fB\-O\fR, \fB\-\-force\-format\fR=\fI\,[\/\fR<f1>][,<f2>]
force the formats given (bz2, gz, lz, xz)
force the formats given (bz2,gz,lz,xz,zst)
.TP
\fB\-q\fR, \fB\-\-quiet\fR
suppress all messages
@ -75,6 +75,9 @@ set compressor and options for lzip format
.TP
\fB\-\-xz=\fR<command>
set compressor and options for xz format
.TP
\fB\-\-zst=\fR<command>
set compressor and options for zstd format
.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...
@ -83,8 +86,20 @@ Report bugs to zutils\-bug@nongnu.org
.br
Zutils home page: http://www.nongnu.org/zutils/zutils.html
.SH COPYRIGHT
Copyright \(co 2021 Antonio Diaz Diaz.
Copyright \(co 2022 Antonio Diaz Diaz.
License GPLv2+: GNU GPL version 2 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.
.SH "SEE ALSO"
The full documentation for
.B zcmp
is maintained as a Texinfo manual. If the
.B info
and
.B zcmp
programs are properly installed at your site, the command
.IP
.B info zutils
.PP
should give you access to the complete manual.

View file

@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.16.
.TH ZDIFF "1" "January 2021" "zutils 1.10" "User Commands"
.TH ZDIFF "1" "January 2022" "zutils 1.11" "User Commands"
.SH NAME
zdiff \- decompress and compare two files line by line
.SH SYNOPSIS
@ -12,7 +12,9 @@ input. If any file given is compressed, its decompressed content is used.
zdiff is a front end to the program diff and has the limitation that messages
from diff refer to temporary file names instead of those specified.
.PP
The formats supported are bzip2, gzip, lzip, and xz.
\&'zdiff \fB\-v\fR \fB\-V\fR' prints the version of the diff program used.
.PP
The formats supported are bzip2, gzip, lzip, xz, and zstd.
.PP
zdiff compares file1 to file2. The standard input is used only if file1 or
file2 refers to standard input. If file2 is omitted zdiff tries the
@ -23,7 +25,7 @@ the corresponding uncompressed file (the name of file1 with the
extension removed).
.IP
\- If file1 is uncompressed, compares it with the decompressed
contents of file1.[lz|bz2|gz|xz] (the first one that is found).
contents of file1.[lz|bz2|gz|zst|xz] (the first one that is found).
.PP
Exit status is 0 if inputs are identical, 1 if different, 2 if trouble.
Some options only work if the diff program used supports them.
@ -66,7 +68,7 @@ process only the formats in <list>
don't read runtime configuration file
.TP
\fB\-O\fR, \fB\-\-force\-format\fR=\fI\,[\/\fR<f1>][,<f2>]
force the formats given (bz2, gz, lz, xz)
force the formats given (bz2,gz,lz,xz,zst)
.TP
\fB\-p\fR, \fB\-\-show\-c\-function\fR
show which C function each change is in
@ -89,6 +91,9 @@ use the unified output format
\fB\-U\fR, \fB\-\-unified=\fR<n>
same as \fB\-u\fR but use <n> lines of context
.TP
\fB\-v\fR, \fB\-\-verbose\fR
verbose mode (for \fB\-\-version\fR)
.TP
\fB\-w\fR, \fB\-\-ignore\-all\-space\fR
ignore all white space
.TP
@ -109,13 +114,28 @@ set compressor and options for lzip format
.TP
\fB\-\-xz=\fR<command>
set compressor and options for xz format
.TP
\fB\-\-zst=\fR<command>
set compressor and options for zstd format
.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 2021 Antonio Diaz Diaz.
Copyright \(co 2022 Antonio Diaz Diaz.
License GPLv2+: GNU GPL version 2 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.
.SH "SEE ALSO"
The full documentation for
.B zdiff
is maintained as a Texinfo manual. If the
.B info
and
.B zdiff
programs are properly installed at your site, the command
.IP
.B info zutils
.PP
should give you access to the complete manual.

View file

@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.16.
.TH ZGREP "1" "January 2021" "zutils 1.10" "User Commands"
.TH ZGREP "1" "January 2022" "zutils 1.11" "User Commands"
.SH NAME
zgrep \- search compressed files for a regular expression
.SH SYNOPSIS
@ -22,7 +22,9 @@ compressed format.
If no files are specified, recursive searches examine the current
working directory, and nonrecursive searches read standard input.
.PP
The formats supported are bzip2, gzip, lzip, and xz.
\&'zgrep \fB\-\-verbose\fR \fB\-V\fR' prints the version of the grep program used.
.PP
The formats supported are bzip2, gzip, lzip, xz, and zstd.
.PP
Exit status is 0 if match, 1 if no match, 2 if trouble.
Some options only work if the grep program used supports them.
@ -68,10 +70,10 @@ obtain patterns from <file>
<pattern> is a set of newline\-separated strings
.TP
\fB\-h\fR, \fB\-\-no\-filename\fR
suppress the prefixing filename on output
suppress the prefixing file name on output
.TP
\fB\-H\fR, \fB\-\-with\-filename\fR
print the filename for each match
print the file name for each match
.TP
\fB\-i\fR, \fB\-\-ignore\-case\fR
ignore case distinctions
@ -101,7 +103,7 @@ don't read runtime configuration file
show only the part of a line matching <pattern>
.TP
\fB\-O\fR, \fB\-\-force\-format=\fR<fmt>
force the format given (bz2, gz, lz, xz)
force the format given (bz2, gz, lz, xz, zst)
.TP
\fB\-q\fR, \fB\-\-quiet\fR
suppress all messages
@ -138,6 +140,9 @@ set compressor and options for lzip format
.TP
\fB\-\-xz=\fR<command>
set compressor and options for xz format
.TP
\fB\-\-zst=\fR<command>
set compressor and options for zstd format
.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...
@ -146,8 +151,20 @@ Report bugs to zutils\-bug@nongnu.org
.br
Zutils home page: http://www.nongnu.org/zutils/zutils.html
.SH COPYRIGHT
Copyright \(co 2021 Antonio Diaz Diaz.
Copyright \(co 2022 Antonio Diaz Diaz.
License GPLv2+: GNU GPL version 2 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.
.SH "SEE ALSO"
The full documentation for
.B zgrep
is maintained as a Texinfo manual. If the
.B info
and
.B zgrep
programs are properly installed at your site, the command
.IP
.B info zutils
.PP
should give you access to the complete manual.

View file

@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.16.
.TH ZTEST "1" "January 2021" "zutils 1.10" "User Commands"
.TH ZTEST "1" "January 2022" "zutils 1.11" "User Commands"
.SH NAME
ztest \- verify the integrity of compressed files
.SH SYNOPSIS
@ -18,7 +18,7 @@ test when testing multiple files.
If no files are specified, recursive searches examine the current
working directory, and nonrecursive searches read standard input.
.PP
The formats supported are bzip2, gzip, lzip, and xz.
The formats supported are bzip2, gzip, lzip, xz, and zstd.
.PP
Note that error detection in the xz format is broken. First, some xz
files lack integrity information. Second, not all xz decompressors can
@ -45,7 +45,7 @@ process only the formats in <list>
don't read runtime configuration file
.TP
\fB\-O\fR, \fB\-\-force\-format=\fR<fmt>
force the format given (bz2, gz, lz, xz)
force the format given (bz2, gz, lz, xz, zst)
.TP
\fB\-q\fR, \fB\-\-quiet\fR
suppress all messages
@ -70,13 +70,28 @@ set compressor and options for lzip format
.TP
\fB\-\-xz=\fR<command>
set compressor and options for xz format
.TP
\fB\-\-zst=\fR<command>
set compressor and options for zstd format
.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 2021 Antonio Diaz Diaz.
Copyright \(co 2022 Antonio Diaz Diaz.
License GPLv2+: GNU GPL version 2 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.
.SH "SEE ALSO"
The full documentation for
.B ztest
is maintained as a Texinfo manual. If the
.B info
and
.B ztest
programs are properly installed at your site, the command
.IP
.B info zutils
.PP
should give you access to the complete manual.

View file

@ -1,12 +1,12 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.16.
.TH ZUPDATE "1" "January 2021" "zutils 1.10" "User Commands"
.TH ZUPDATE "1" "January 2022" "zutils 1.11" "User Commands"
.SH NAME
zupdate \- recompress bzip2, gzip, xz files to lzip format
zupdate \- recompress bzip2, gzip, xz, zstd files to lzip format
.SH SYNOPSIS
.B zupdate
[\fI\,options\/\fR] [\fI\,files\/\fR]
.SH DESCRIPTION
zupdate recompresses files from bzip2, gzip, and xz formats to lzip
zupdate recompresses files from bzip2, gzip, xz, and zstd formats to lzip
format. Each original is compared with the new file and then deleted.
Only regular files with standard file name extensions are recompressed,
other files are ignored. Compressed files are decompressed and then
@ -25,8 +25,10 @@ to be safe and not cause any data loss. Therefore, existing lzip
compressed files are never overwritten nor deleted.
.PP
The names of the original files must have one of the following extensions:
\&'.bz2', '.gz', or '.xz', which are recompressed to '.lz';
\&'.tbz', '.tbz2', '.tgz', or '.txz', which are recompressed to '.tlz'.
.PP
\&'.bz2', '.gz', '.xz', or '.zst', which are recompressed to '.lz'.
.PP
\&'.tbz', '.tbz2', '.tgz', '.txz', or '.tzst', which are recompressed to '.tlz'.
.PP
Exit status is 0 if all the compressed files were successfully recompressed
(if needed), compared, and deleted (if requested). Non\-zero otherwise.
@ -79,13 +81,28 @@ set compressor and options for lzip format
.TP
\fB\-\-xz=\fR<command>
set compressor and options for xz format
.TP
\fB\-\-zst=\fR<command>
set compressor and options for zstd format
.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 2021 Antonio Diaz Diaz.
Copyright \(co 2022 Antonio Diaz Diaz.
License GPLv2+: GNU GPL version 2 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.
.SH "SEE ALSO"
The full documentation for
.B zupdate
is maintained as a Texinfo manual. If the
.B info
and
.B zupdate
programs are properly installed at your site, the command
.IP
.B info zutils
.PP
should give you access to the complete manual.

View file

@ -1,6 +1,6 @@
This is zutils.info, produced by makeinfo version 4.13+ from zutils.texi.
INFO-DIR-SECTION Data Compression
INFO-DIR-SECTION Compression
START-INFO-DIR-ENTRY
* Zutils: (zutils). Utilities dealing with compressed files
END-INFO-DIR-ENTRY
@ -11,7 +11,7 @@ File: zutils.info, Node: Top, Next: Introduction, Up: (dir)
Zutils Manual
*************
This manual is for Zutils (version 1.10, 5 January 2021).
This manual is for Zutils (version 1.11, 25 January 2022).
* Menu:
@ -28,7 +28,7 @@ This manual is for Zutils (version 1.10, 5 January 2021).
* Concept index:: Index of concepts
Copyright (C) 2009-2021 Antonio Diaz Diaz.
Copyright (C) 2009-2022 Antonio Diaz Diaz.
This manual is free documentation: you have unlimited permission to copy,
distribute, and modify it.
@ -50,7 +50,7 @@ programs. In particular the option '--recursive' is very efficient in those
utilities supporting it.
The utilities provided are zcat, zcmp, zdiff, zgrep, ztest, and zupdate.
The formats supported are bzip2, gzip, lzip, and xz.
The formats supported are bzip2, gzip, lzip, xz, and zstd.
Zutils uses external compressors. The compressor to be used for each format
is configurable at runtime.
@ -60,12 +60,14 @@ to gzip's znew.
NOTE: Bzip2 and lzip provide well-defined values of exit status, which
makes them safe to use with zutils. Gzip and xz may return ambiguous warning
values, making them less reliable back ends for zutils. *Note
values, making them less reliable back ends for zutils. Zstd currently does
not even document its exit status in its man page. *Note
compressor-requirements::.
FORMAT NOTE 1: The option '--format' allows the processing of a subset
of formats in recursive mode and when trying compressed file names:
'zgrep foo -r --format=bz2,lz somedir somefile.tar'.
of formats in recursive mode and when trying compressed file names. For
example, use the following command to search for the string 'foo' in gzip
and lzip files only: 'zgrep foo -r --format=gz,lz somedir somefile.tar'.
FORMAT NOTE 2: If the option '--force-format' is given, the files are
passed to the corresponding decompressor without verifying their format,
@ -110,12 +112,14 @@ here. *Note Argument syntax: (arg_parser)Argument syntax.
'-V'
'--version'
Print the version number on the standard output and exit. This version
number should be included in all bug reports.
number should be included in all bug reports. In verbose mode, zdiff
and zgrep print also the version of the diff or grep program used
respectively.
'-M FORMAT_LIST'
'--format=FORMAT_LIST'
Process only the formats listed in the comma-separated FORMAT_LIST.
Valid formats are 'bz2', 'gz', 'lz', 'xz', and 'un' for
Valid formats are 'bz2', 'gz', 'lz', 'xz', 'zst', and 'un' for
'uncompressed', meaning "any file name without a known extension".
This option excludes files based on extension, instead of format,
because it is more efficient. The exclusion only applies to names
@ -130,6 +134,7 @@ here. *Note Argument syntax: (arg_parser)Argument syntax.
gz enables .gz .tgz
lz enables .lz .tlz
xz enables .xz .txz
zst enables .zst .tzst
un enables any other file name
'-N'
@ -140,17 +145,18 @@ here. *Note Argument syntax: (arg_parser)Argument syntax.
'--gz=COMMAND'
'--lz=COMMAND'
'--xz=COMMAND'
'--zst=COMMAND'
Set program to be used as (de)compressor for the corresponding format.
COMMAND may include arguments. For example '--lz='plzip --threads=2''.
The program set with '--lz' is used for both compression and
decompression. The other three are used only for decompression. The
name of the program can't begin with '-'. These options override the
values set in 'zutilsrc'. The compression program used must meet three
decompression. The others are used only for decompression. The name of
the program can't begin with '-'. These options override the values
set in 'zutilsrc'. The compression program used must meet three
requirements:
1. When called with the option '-d', it must read compressed data
from the standard input and produce decompressed data on the
standard output.
1. When called with the option '-d' and without file names, it must
read compressed data from the standard input and produce
decompressed data on the standard output.
2. If the option '-q' is passed to zutils, the compression program
must also accept it.
@ -181,7 +187,7 @@ is fairly obvious (and there are further instructions in it):
2. Each non-comment line defines the command to be used for the
corresponding format, with the syntax:
<format> = <compressor> [options]
where <format> is one of 'bz2', 'gz', 'lz', or 'xz'.
where <format> is one of 'bz2', 'gz', 'lz', 'xz', or 'zst'.

File: zutils.info, Node: Zcat, Next: Zcmp, Prev: The zutilsrc file, Up: Top
@ -235,9 +241,10 @@ Exit status is 0 if no errors occurred, 1 otherwise.
'-O FORMAT'
'--force-format=FORMAT'
Force the compressed format given. Valid values for FORMAT are 'bz2',
'gz', 'lz', and 'xz'. If this option is used, the files are passed to
the corresponding decompressor without verifying their format, and the
exact file name must be given. Other names won't be tried.
'gz', 'lz', 'xz', and 'zst'. If this option is used, the files are
passed to the corresponding decompressor without verifying their
format, and the exact file name must be given. Other names won't be
tried.
'-q'
'--quiet'
@ -301,7 +308,7 @@ following:
removed).
- If FILE1 is uncompressed, compares it with the decompressed contents
of FILE1.[lz|bz2|gz|xz] (the first one that is found).
of FILE1.[lz|bz2|gz|zst|xz] (the first one that is found).
An exit status of 0 means no differences were found, 1 means some
differences were found, and 2 means trouble.
@ -336,11 +343,11 @@ differences were found, and 2 means trouble.
'--force-format=[FORMAT1][,FORMAT2]'
Force the compressed formats given. Any of FORMAT1 or FORMAT2 may be
omitted and the corresponding format will be automatically detected.
Valid values for FORMAT are 'bz2', 'gz', 'lz', and 'xz'. If at least
one format is specified with this option, the file is passed to the
corresponding decompressor without verifying its format, and the exact
file names of both FILE1 and FILE2 must be given. Other names won't be
tried.
Valid values for FORMAT are 'bz2', 'gz', 'lz', 'xz', and 'zst'. If at
least one format is specified with this option, the file is passed to
the corresponding decompressor without verifying its format, and the
exact file names of both FILE1 and FILE2 must be given. Other names
won't be tried.
'-q'
'-s'
@ -376,7 +383,7 @@ following:
removed).
- If FILE1 is uncompressed, compares it with the decompressed contents
of FILE1.[lz|bz2|gz|xz] (the first one that is found).
of FILE1.[lz|bz2|gz|zst|xz] (the first one that is found).
An exit status of 0 means no differences were found, 1 means some
differences were found, and 2 means trouble.
@ -419,11 +426,11 @@ program used supports them):
'--force-format=[FORMAT1][,FORMAT2]'
Force the compressed formats given. Any of FORMAT1 or FORMAT2 may be
omitted and the corresponding format will be automatically detected.
Valid values for FORMAT are 'bz2', 'gz', 'lz', and 'xz'. If at least
one format is specified with this option, the file is passed to the
corresponding decompressor without verifying its format, and the exact
file names of both FILE1 and FILE2 must be given. Other names won't be
tried.
Valid values for FORMAT are 'bz2', 'gz', 'lz', 'xz', and 'zst'. If at
least one format is specified with this option, the file is passed to
the corresponding decompressor without verifying its format, and the
exact file names of both FILE1 and FILE2 must be given. Other names
won't be tried.
'-p'
'--show-c-function'
@ -452,6 +459,11 @@ program used supports them):
'--unified=N'
Same as -u but use N lines of context.
'-v'
'--verbose'
When specified before '--version', print the version of the diff
program used.
'-w'
'--ignore-all-space'
Ignore all white space.
@ -576,9 +588,10 @@ program used supports them):
'-O FORMAT'
'--force-format=FORMAT'
Force the compressed format given. Valid values for FORMAT are 'bz2',
'gz', 'lz', and 'xz'. If this option is used, the files are passed to
the corresponding decompressor without verifying their format, and the
exact file name must be given. Other names won't be tried.
'gz', 'lz', 'xz', and 'zst'. If this option is used, the files are
passed to the corresponding decompressor without verifying their
format, and the exact file name must be given. Other names won't be
tried.
'-q'
'--quiet'
@ -605,7 +618,8 @@ program used supports them):
Select non-matching lines.
'--verbose'
Verbose mode. Show error messages.
Verbose mode. Show error messages. When specified before '--version',
print the version of the grep program used.
'-w'
'--word-regexp'
@ -634,6 +648,10 @@ test when testing multiple files.
If no files are specified, recursive searches examine the current working
directory, and nonrecursive searches read standard input.
Bzip2, gzip, and lzip are the primary formats. Xz and zstd are optional.
If the decompressor for the xz or zstd formats is not found, the
corresponding files are ignored.
Note that error detection in the xz format is broken. First, some xz
files lack integrity information. Second, not all xz decompressors can
verify the integrity of all xz files. Third, section 2.1.1.2 'Stream Flags'
@ -654,11 +672,12 @@ compressed file is corrupt or invalid.
'-O FORMAT'
'--force-format=FORMAT'
Force the compressed format given. Valid values for FORMAT are 'bz2',
'gz', 'lz', and 'xz'. If this option is used, the files are passed to
the corresponding decompressor without verifying their format, and any
files in a format that the decompressor can't understand will fail.
For example, '--force-format=gz' can test gzipped (.gz) and compress'd
(.Z) files if the compressor used is GNU gzip.
'gz', 'lz', 'xz', and 'zst'. If this option is used, the files are
passed to the corresponding decompressor without verifying their
format, and any files in a format that the decompressor can't
understand will fail. For example, '--force-format=gz' can test
gzipped (.gz) and compress'd (.Z) files if the compressor used is GNU
gzip.
'-q'
'--quiet'
@ -687,14 +706,14 @@ File: zutils.info, Node: Zupdate, Next: Problems, Prev: Ztest, Up: Top
9 Zupdate
*********
zupdate recompresses files from bzip2, gzip, and xz formats to lzip format.
Each original is compared with the new file and then deleted. Only regular
files with standard file name extensions are recompressed, other files are
ignored. Compressed files are decompressed and then recompressed on the fly;
no temporary files are created. If an error happens while recompressing a
file, zupdate exits immediately without recompressing the rest of the files.
The lzip format is chosen as destination because it is the most appropriate
for long-term data archiving.
zupdate recompresses files from bzip2, gzip, xz, and zstd formats to lzip
format. Each original is compared with the new file and then deleted. Only
regular files with standard file name extensions are recompressed, other
files are ignored. Compressed files are decompressed and then recompressed
on the fly; no temporary files are created. If an error happens while
recompressing a file, zupdate exits immediately without recompressing the
rest of the files. The lzip format is chosen as destination because it is
the most appropriate for long-term data archiving.
If no files are specified, recursive searches examine the current working
directory, and nonrecursive searches do nothing.
@ -706,17 +725,26 @@ the original file is not deleted. The operation of zupdate is meant to be
safe and not cause any data loss. Therefore, existing lzip compressed files
are never overwritten nor deleted.
Recompressing files from a read-only file system to another place can be
done by first linking the files from the destination directory and then
compressing the links: 'ln -s /src/foo.gz . && zupdate foo.gz'
Combining the options '--force' and '--keep', as in
'zupdate -f -k *.gz', verifies that there are no differences between each
pair of files in a multiformat set of files.
The names of the original files must have one of the following
extensions:
'.bz2', '.gz', or '.xz', which are recompressed to '.lz';
'.tbz', '.tbz2', '.tgz', or '.txz', which are recompressed to '.tlz'.
'.bz2', '.gz', '.xz', or '.zst', which are recompressed to '.lz';
'.tbz', '.tbz2', '.tgz', '.txz', or '.tzst', which are recompressed to
'.tlz'.
Keeping the combined extensions ('.tgz' -> '.tlz') may be useful when
recompressing Slackware packages, for example.
Bzip2, gzip, and lzip are the primary formats. Xz and zstd are optional.
If the decompressor for the xz or zstd formats is not found, the
corresponding files are ignored.
Recompressing a file is much like copying or moving it; therefore zupdate
preserves the access and modification dates, permissions, and, when
possible, ownership of the file just as 'cp -p' does. (If the user ID or
@ -816,19 +844,19 @@ Concept index

Tag Table:
Node: Top222
Node: Introduction1151
Node: Common options3776
Ref: compressor-requirements5847
Node: The zutilsrc file6219
Node: Zcat7180
Node: Zcmp9743
Node: Zdiff12233
Node: Zgrep14973
Node: Ztest19218
Node: Zupdate21725
Node: Problems25409
Node: Concept index25943
Node: Top217
Node: Introduction1147
Node: Common options3947
Ref: compressor-requirements6181
Node: The zutilsrc file6576
Node: Zcat7544
Node: Zcmp10119
Node: Zdiff12620
Node: Zgrep15478
Node: Ztest19819
Node: Zupdate22513
Node: Problems26607
Node: Concept index27141

End Tag Table

View file

@ -6,10 +6,10 @@
@finalout
@c %**end of header
@set UPDATED 5 January 2021
@set VERSION 1.10
@set UPDATED 25 January 2022
@set VERSION 1.11
@dircategory Data Compression
@dircategory Compression
@direntry
* Zutils: (zutils). Utilities dealing with compressed files
@end direntry
@ -50,7 +50,7 @@ This manual is for Zutils (version @value{VERSION}, @value{UPDATED}).
@end menu
@sp 1
Copyright @copyright{} 2009-2021 Antonio Diaz Diaz.
Copyright @copyright{} 2009-2022 Antonio Diaz Diaz.
This manual is free documentation: you have unlimited permission to copy,
distribute, and modify it.
@ -74,7 +74,7 @@ those utilities supporting it.
@noindent
The utilities provided are zcat, zcmp, zdiff, zgrep, ztest, and zupdate.@*
The formats supported are bzip2, gzip, lzip, and xz.@*
The formats supported are bzip2, gzip, lzip, xz, and zstd.@*
Zutils uses external compressors. The compressor to be used for each format
is configurable at runtime.
@ -84,12 +84,15 @@ gzip's znew.
NOTE: Bzip2 and lzip provide well-defined values of exit status, which makes
them safe to use with zutils. Gzip and xz may return ambiguous warning
values, making them less reliable back ends for zutils.
values, making them less reliable back ends for zutils. Zstd currently does
not even document its exit status in its man page.
@xref{compressor-requirements}.
FORMAT NOTE 1: The option @samp{--format} allows the processing of a subset
of formats in recursive mode and when trying compressed file names:
@w{@samp{zgrep foo -r --format=bz2,lz somedir somefile.tar}}.
of formats in recursive mode and when trying compressed file names. For
example, use the following command to search for the string @samp{foo} in
gzip and lzip files only:
@w{@samp{zgrep foo -r --format=gz,lz somedir somefile.tar}}.
FORMAT NOTE 2: If the option @samp{--force-format} is given, the files are
passed to the corresponding decompressor without verifying their format,
@ -141,17 +144,19 @@ only supports the @samp{--help} form of this option.
@itemx --version
Print the version number on the standard output and exit.
This version number should be included in all bug reports.
In verbose mode, zdiff and zgrep print also the version of the diff or grep
program used respectively.
@item -M @var{format_list}
@itemx --format=@var{format_list}
Process only the formats listed in the comma-separated
@var{format_list}. Valid formats are @samp{bz2}, @samp{gz}, @samp{lz},
@samp{xz}, and @samp{un} for @samp{uncompressed}, meaning "any file name
without a known extension". This option excludes files based on
extension, instead of format, because it is more efficient. The
exclusion only applies to names generated automatically (for example
when adding extensions to a file name or when operating recursively on
directories). Files given in the command line are always processed.
Process only the formats listed in the comma-separated @var{format_list}.
Valid formats are @samp{bz2}, @samp{gz}, @samp{lz}, @samp{xz}, @samp{zst},
and @samp{un} for @samp{uncompressed}, meaning "any file name without a
known extension". This option excludes files based on extension, instead of
format, because it is more efficient. The exclusion only applies to names
generated automatically (for example when adding extensions to a file name
or when operating recursively on directories). Files given in the command
line are always processed.
Each format in @var{format_list} enables file names with the following
extensions:
@ -161,6 +166,7 @@ extensions:
@item gz @tab enables @tab .gz .tgz
@item lz @tab enables @tab .lz .tlz
@item xz @tab enables @tab .xz .txz
@item zst @tab enables @tab .zst .tzst
@item un @tab enables @tab any other file name
@end multitable
@ -172,19 +178,21 @@ Don't read the runtime configuration file @samp{zutilsrc}.
@itemx --gz=@var{command}
@itemx --lz=@var{command}
@itemx --xz=@var{command}
@itemx --zst=@var{command}
Set program to be used as (de)compressor for the corresponding format.
@var{command} may include arguments. For example
@w{@samp{--lz='plzip --threads=2'}}. The program set with @samp{--lz} is
used for both compression and decompression. The other three are used only
for decompression. The name of the program can't begin with @samp{-}. These
used for both compression and decompression. The others are used only for
decompression. The name of the program can't begin with @samp{-}. These
options override the values set in @file{zutilsrc}. The compression program
used must meet three requirements:
@anchor{compressor-requirements}
@enumerate
@item
When called with the option @samp{-d}, it must read compressed data from
the standard input and produce decompressed data on the standard output.
When called with the option @samp{-d} and without file names, it must read
compressed data from the standard input and produce decompressed data on the
standard output.
@item
If the option @samp{-q} is passed to zutils, the compression program must
also accept it.
@ -220,7 +228,8 @@ format, with the syntax:
@example
<format> = <compressor> [options]
@end example
where <format> is one of @samp{bz2}, @samp{gz}, @samp{lz}, or @samp{xz}.
where <format> is one of @samp{bz2}, @samp{gz}, @samp{lz}, @samp{xz}, or
@samp{zst}.
@end enumerate
@ -278,10 +287,10 @@ Number all output lines, starting with 1. The line count is unlimited.
@item -O @var{format}
@itemx --force-format=@var{format}
Force the compressed format given. Valid values for @var{format} are
@samp{bz2}, @samp{gz}, @samp{lz}, and @samp{xz}. If this option is used,
the files are passed to the corresponding decompressor without verifying
their format, and the exact file name must be given. Other names won't
be tried.
@samp{bz2}, @samp{gz}, @samp{lz}, @samp{xz}, and @samp{zst}. If this option
is used, the files are passed to the corresponding decompressor without
verifying their format, and the exact file name must be given. Other names
won't be tried.
@item -q
@itemx --quiet
@ -350,7 +359,7 @@ the corresponding uncompressed file (the name of @var{file1} with the
extension removed).
@item
If @var{file1} is uncompressed, compares it with the decompressed
contents of @var{file1}.[lz|bz2|gz|xz] (the first one that is found).
contents of @var{file1}.[lz|bz2|gz|zst|xz] (the first one that is found).
@end itemize
@noindent
@ -387,13 +396,13 @@ Compare at most @var{count} input bytes.
@item -O [@var{format1}][,@var{format2}]
@itemx --force-format=[@var{format1}][,@var{format2}]
Force the compressed formats given. Any of @var{format1} or
@var{format2} may be omitted and the corresponding format will be
automatically detected. Valid values for @var{format} are @samp{bz2},
@samp{gz}, @samp{lz}, and @samp{xz}. If at least one format is specified
with this option, the file is passed to the corresponding decompressor
without verifying its format, and the exact file names of both
@var{file1} and @var{file2} must be given. Other names won't be tried.
Force the compressed formats given. Any of @var{format1} or @var{format2}
may be omitted and the corresponding format will be automatically detected.
Valid values for @var{format} are @samp{bz2}, @samp{gz}, @samp{lz},
@samp{xz}, and @samp{zst}. If at least one format is specified with this
option, the file is passed to the corresponding decompressor without
verifying its format, and the exact file names of both @var{file1} and
@var{file2} must be given. Other names won't be tried.
@item -q
@itemx -s
@ -434,7 +443,7 @@ the corresponding uncompressed file (the name of @var{file1} with the
extension removed).
@item
If @var{file1} is uncompressed, compares it with the decompressed
contents of @var{file1}.[lz|bz2|gz|xz] (the first one that is found).
contents of @var{file1}.[lz|bz2|gz|zst|xz] (the first one that is found).
@end itemize
@noindent
@ -478,13 +487,13 @@ Ignore case differences in file contents.
@item -O [@var{format1}][,@var{format2}]
@itemx --force-format=[@var{format1}][,@var{format2}]
Force the compressed formats given. Any of @var{format1} or
@var{format2} may be omitted and the corresponding format will be
automatically detected. Valid values for @var{format} are @samp{bz2},
@samp{gz}, @samp{lz}, and @samp{xz}. If at least one format is specified
with this option, the file is passed to the corresponding decompressor
without verifying its format, and the exact file names of both
@var{file1} and @var{file2} must be given. Other names won't be tried.
Force the compressed formats given. Any of @var{format1} or @var{format2}
may be omitted and the corresponding format will be automatically detected.
Valid values for @var{format} are @samp{bz2}, @samp{gz}, @samp{lz},
@samp{xz}, and @samp{zst}. If at least one format is specified with this
option, the file is passed to the corresponding decompressor without
verifying its format, and the exact file names of both @var{file1} and
@var{file2} must be given. Other names won't be tried.
@item -p
@itemx --show-c-function
@ -513,6 +522,11 @@ Use the unified output format.
@itemx --unified=@var{n}
Same as -u but use @var{n} lines of context.
@item -v
@itemx --verbose
When specified before @samp{--version}, print the version of the diff
program used.
@item -w
@itemx --ignore-all-space
Ignore all white space.
@ -644,10 +658,10 @@ Show only the part of matching lines that actually matches @var{pattern}.
@item -O @var{format}
@itemx --force-format=@var{format}
Force the compressed format given. Valid values for @var{format} are
@samp{bz2}, @samp{gz}, @samp{lz}, and @samp{xz}. If this option is used,
the files are passed to the corresponding decompressor without verifying
their format, and the exact file name must be given. Other names won't
be tried.
@samp{bz2}, @samp{gz}, @samp{lz}, @samp{xz}, and @samp{zst}. If this option
is used, the files are passed to the corresponding decompressor without
verifying their format, and the exact file name must be given. Other names
won't be tried.
@item -q
@itemx --quiet
@ -674,7 +688,8 @@ Suppress error messages about nonexistent or unreadable files.
Select non-matching lines.
@item --verbose
Verbose mode. Show error messages.
Verbose mode. Show error messages. When specified before @samp{--version},
print the version of the grep program used.
@item -w
@itemx --word-regexp
@ -703,6 +718,10 @@ test when testing multiple files.
If no files are specified, recursive searches examine the current working
directory, and nonrecursive searches read standard input.
Bzip2, gzip, and lzip are the primary formats. Xz and zstd are optional. If
the decompressor for the xz or zstd formats is not found, the corresponding
files are ignored.
Note that error detection in the xz format is broken. First, some xz
files lack integrity information. Second, not all xz decompressors can
@uref{http://www.nongnu.org/lzip/xz_inadequate.html#fragmented,,verify the integrity}
@ -730,11 +749,11 @@ ztest supports the following options:
@item -O @var{format}
@itemx --force-format=@var{format}
Force the compressed format given. Valid values for @var{format} are
@samp{bz2}, @samp{gz}, @samp{lz}, and @samp{xz}. If this option is used, the
files are passed to the corresponding decompressor without verifying their
format, and any files in a format that the decompressor can't understand
will fail. For example, @samp{--force-format=gz} can test gzipped (.gz) and
compress'd (.Z) files if the compressor used is GNU gzip.
@samp{bz2}, @samp{gz}, @samp{lz}, @samp{xz}, and @samp{zst}. If this option
is used, the files are passed to the corresponding decompressor without
verifying their format, and any files in a format that the decompressor
can't understand will fail. For example, @samp{--force-format=gz} can test
gzipped (.gz) and compress'd (.Z) files if the compressor used is GNU gzip.
@item -q
@itemx --quiet
@ -763,14 +782,14 @@ Further -v's increase the verbosity level.
@chapter Zupdate
@cindex zupdate
zupdate recompresses files from bzip2, gzip, and xz formats to lzip format.
Each original is compared with the new file and then deleted. Only regular
files with standard file name extensions are recompressed, other files are
ignored. Compressed files are decompressed and then recompressed on the fly;
no temporary files are created. If an error happens while recompressing a
file, zupdate exits immediately without recompressing the rest of the files.
The lzip format is chosen as destination because it is the most appropriate
for long-term data archiving.
zupdate recompresses files from bzip2, gzip, xz, and zstd formats to lzip
format. Each original is compared with the new file and then deleted. Only
regular files with standard file name extensions are recompressed, other
files are ignored. Compressed files are decompressed and then recompressed
on the fly; no temporary files are created. If an error happens while
recompressing a file, zupdate exits immediately without recompressing the
rest of the files. The lzip format is chosen as destination because it is
the most appropriate for long-term data archiving.
If no files are specified, recursive searches examine the current working
directory, and nonrecursive searches do nothing.
@ -782,21 +801,29 @@ and the original file is not deleted. The operation of zupdate is meant
to be safe and not cause any data loss. Therefore, existing lzip
compressed files are never overwritten nor deleted.
Recompressing files from a read-only file system to another place can be
done by first linking the files from the destination directory and then
compressing the links: @w{@samp{ln -s /src/foo.gz . && zupdate foo.gz}}
Combining the options @samp{--force} and @samp{--keep}, as in
@w{@samp{zupdate -f -k *.gz}}, verifies that there are no differences
between each pair of files in a multiformat set of files.
The names of the original files must have one of the following extensions:@*
@samp{.bz2}, @samp{.gz}, or @samp{.xz}, which are recompressed to
@samp{.lz};@*
@samp{.tbz}, @samp{.tbz2}, @samp{.tgz}, or @samp{.txz}, which are
recompressed to @samp{.tlz}.@*
@samp{.bz2}, @samp{.gz}, @samp{.xz}, or @samp{.zst}, which are recompressed
to @samp{.lz};@*
@samp{.tbz}, @samp{.tbz2}, @samp{.tgz}, @samp{.txz}, or @samp{.tzst}, which
are recompressed to @samp{.tlz}.@*
Keeping the combined extensions (@samp{.tgz} --> @samp{.tlz}) may be useful
when recompressing Slackware packages, for example.
Bzip2, gzip, and lzip are the primary formats. Xz and zstd are optional. If
the decompressor for the xz or zstd formats is not found, the corresponding
files are ignored.
Recompressing a file is much like copying or moving it; therefore zupdate
preserves the access and modification dates, permissions, and, when
possible, ownership of the file just as @samp{cp -p} does. (If the user ID or
possible, ownership of the file just as @w{@samp{cp -p}} does. (If the user ID or
the group ID can't be duplicated, the file permission bits S_ISUID and
S_ISGID are cleared).