summaryrefslogtreecommitdiffstats
path: root/doc/zutils.info
diff options
context:
space:
mode:
Diffstat (limited to 'doc/zutils.info')
-rw-r--r--doc/zutils.info154
1 files changed, 91 insertions, 63 deletions
diff --git a/doc/zutils.info b/doc/zutils.info
index 854100f..a75b183 100644
--- a/doc/zutils.info
+++ b/doc/zutils.info
@@ -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