diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-08 04:40:35 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-08 04:40:35 +0000 |
commit | f7deb94049481143ef12eab590840d39aecedc14 (patch) | |
tree | 9ff4090b78d8343fd073ba1ea32068bb0d07caa6 /doc/zutils.texi | |
parent | Adding debian version 1.3-4. (diff) | |
download | zutils-f7deb94049481143ef12eab590840d39aecedc14.tar.xz zutils-f7deb94049481143ef12eab590840d39aecedc14.zip |
Merging upstream version 1.4~pre2.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'doc/zutils.texi')
-rw-r--r-- | doc/zutils.texi | 138 |
1 files changed, 96 insertions, 42 deletions
diff --git a/doc/zutils.texi b/doc/zutils.texi index 6737c72..4624d8c 100644 --- a/doc/zutils.texi +++ b/doc/zutils.texi @@ -6,8 +6,8 @@ @finalout @c %**end of header -@set UPDATED 30 August 2014 -@set VERSION 1.3 +@set UPDATED 30 April 2015 +@set VERSION 1.4-pre2 @dircategory Data Compression @direntry @@ -36,7 +36,7 @@ This manual is for Zutils (version @value{VERSION}, @value{UPDATED}). @menu * Introduction:: Purpose and features of zutils -* Common options:: Common options +* Common options:: Options common to all utilities * The zutilsrc file:: The zutils configuration file * Zcat:: Concatenating compressed files * Zcmp:: Comparing compressed files byte by byte @@ -49,7 +49,7 @@ This manual is for Zutils (version @value{VERSION}, @value{UPDATED}). @end menu @sp 1 -Copyright @copyright{} 2009-2014 Antonio Diaz Diaz. +Copyright @copyright{} 2009-2015 Antonio Diaz Diaz. This manual is free documentation: you have unlimited permission to copy, distribute and modify it. @@ -81,11 +81,16 @@ similar 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. +@xref{compressor-requirements}. -FORMAT NOTE: If the @samp{--format} option is given, the corresponding -files are passed to the decompressor without verifying their format, +FORMAT NOTE: The "--format" option allows the processing of a subset of +formats in search and recursive modes: +@w{@samp{zgrep foo -r --format=bz2,lz somedir}}. + +FORMAT NOTE 2: If the @samp{--force-format} option is given, the files are +passed to the corresponding decompressor without verifying their format, allowing for example the processing of compress'd (.Z) files with gzip: -@samp{zcmp --format=gz file.Z file.lz}. +@w{@samp{zcmp --force-format=gz file.Z file.lz}}. LANGUAGE NOTE: Uncompressed = not compressed = plain data; it may never have been compressed. Decompressed is used to refer to data which has @@ -128,6 +133,28 @@ only supports the @samp{--help} form of this option. @itemx --version Print the version number on the standard output and exit. +@item -M @var{format_list} +@itemx --format=@var{format_list} +Exclude formats not 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. + +Each format in @var{format_list} enables file names with the following +extensions: + +@multitable {bz2} {enables} {any other file name} +@item bz2 @tab enables @tab .bz2 .tbz .tbz2 +@item gz @tab enables @tab .gz .tgz +@item lz @tab enables @tab .lz .tlz +@item xz @tab enables @tab .xz .txz +@item un @tab enables @tab any other file name +@end multitable + @item -N @itemx --no-rcfile Don't read the runtime configuration file @samp{zutilsrc}. @@ -137,9 +164,11 @@ Don't read the runtime configuration file @samp{zutilsrc}. @itemx --lz=@var{command} @itemx --xz=@var{command} Set program (may include arguments) to be used as (de)compressor for the -given format. These options override the values set in @file{zutilsrc}. -The compression program used must meet three requirements: +given format. The mane 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 @samp{-d} option, it must read compressed data from @@ -227,15 +256,18 @@ Equivalent to @samp{-vE}. @itemx --show-ends Print a @samp{$} after the end of each line. -@item --format=@var{fmt} -Force the given compression format. Valid values for @var{fmt} are -@samp{bz2}, @samp{gz}, @samp{lz} and @samp{xz}. If this option is used, -the exact file name must be given. Other names won't be tried. - @item -n @itemx --number Number all output lines, starting with 1. The line count is unlimited. +@item -O @var{format} +@itemx --force-format=@var{format} +Force the given compression format. 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. + @item -q @itemx --quiet Quiet operation. Suppress all messages. @@ -313,14 +345,6 @@ 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 --format=[@var{fmt1}][,@var{fmt2}] -Force the given compression formats. Any of @var{fmt1} or @var{fmt2} may -be omitted and the corresponding format will be automatically detected. -Valid values for @var{fmt} are @samp{bz2}, @samp{gz}, @samp{lz} and -@samp{xz}. If at least one format is specified with this option, the -exact file names of both @var{file1} and @var{file2} must be given. -Other names won't be tried. - @item -i @var{size} @itemx --ignore-initial=@var{size} Ignore any differences in the first @var{size} bytes of the input files. @@ -340,6 +364,16 @@ differing bytes. @itemx --bytes=@var{count} Compare at most @var{count} input bytes. +@item -O [@var{format1}][,@var{format2}] +@itemx --force-format=[@var{format1}][,@var{format2}] +Force the given compression formats. 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. + @item -q @itemx -s @itemx --quiet @@ -358,7 +392,7 @@ 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 decompressed 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. +temporary file names instead of those specified. The format for running zdiff is: @@ -417,18 +451,20 @@ Try hard to find a smaller set of changes. @itemx --ignore-tab-expansion Ignore changes due to tab expansion. -@item --format=[@var{fmt1}][,@var{fmt2}] -Force the given compression formats. Any of @var{fmt1} or @var{fmt2} may -be omitted and the corresponding format will be automatically detected. -Valid values for @var{fmt} are @samp{bz2}, @samp{gz}, @samp{lz} and -@samp{xz}. If at least one format is specified with this option, the -exact file names of both @var{file1} and @var{file2} must be given. -Other names won't be tried. - @item -i @itemx --ignore-case Ignore case differences in file contents. +@item -O [@var{format1}][,@var{format2}] +@itemx --force-format=[@var{format1}][,@var{format2}] +Force the given compression formats. 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. + @item -p @itemx --show-c-function Show which C function each change is in. @@ -532,19 +568,14 @@ Obtain patterns from @var{file}, one per line. @itemx --fixed-strings Treat @var{pattern} as a set of newline-separated strings. -@item --format=@var{fmt} -Force the given compression format. Valid values for @var{fmt} are -@samp{bz2}, @samp{gz}, @samp{lz} and @samp{xz}. If this option is used, -the exact file name must be given. Other names won't be tried. - @item -h @itemx --no-filename -Suppress the prefixing of filenames on output when multiple files are +Suppress the prefixing of file names on output when multiple files are searched. @item -H @itemx --with-filename -Print the filename for each match. +Print the file name for each match. @item -i @itemx --ignore-case @@ -573,6 +604,14 @@ Prefix each matched line with its line number in the input file. @itemx --only-matching Show only the part of matching lines that actually matches @var{pattern}. +@item -O @var{format} +@itemx --force-format=@var{format} +Force the given compression format. 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. + @item -q @itemx --quiet Suppress all messages. Exit immediately with zero status if any match is @@ -630,10 +669,15 @@ environmental problems (file not found, invalid flags, I/O errors, etc), Ztest supports the following options: @table @samp -@item --format=@var{fmt} -Force the given compression format. Valid values for @var{fmt} are +@item -O @var{format} +@itemx --force-format=@var{format} +Force the given compression format. Valid values for @var{format} are @samp{bz2}, @samp{gz}, @samp{lz} and @samp{xz}. If this option is used, -all files not in the given format will fail. +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 @@ -670,11 +714,21 @@ and the original file is not deleted. The operation of zupdate is meant to be safe and not produce any data loss. Therefore, existing lzip compressed files are never overwritten nor deleted. +Combining the @samp{--force} and @samp{--keep} options, as in +@w{@code{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{.tbz}, @samp{.tbz2}, @samp{.gz}, @samp{.tgz}, @samp{.xz}, @samp{.txz}. The files produced have the extensions @samp{.lz} or @samp{.tar.lz}. +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 the group ID can't be duplicated, the file permission bits S_ISUID +and S_ISGID are cleared). + The format for running zupdate is: @example @@ -739,7 +793,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{zupdate --version}}. +find by running @w{@code{zupdate --version}}. @node Concept index |