diff options
Diffstat (limited to '')
-rw-r--r-- | doc/zcat.1 | 11 | ||||
-rw-r--r-- | doc/zcmp.1 | 13 | ||||
-rw-r--r-- | doc/zdiff.1 | 13 | ||||
-rw-r--r-- | doc/zgrep.1 | 13 | ||||
-rw-r--r-- | doc/ztest.1 | 11 | ||||
-rw-r--r-- | doc/zupdate.1 | 7 | ||||
-rw-r--r-- | doc/zutils.info | 158 | ||||
-rw-r--r-- | doc/zutils.texi | 138 |
8 files changed, 243 insertions, 121 deletions
@@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.46.1. -.TH ZCAT "1" "August 2014" "zcat (zutils) 1.3" "User Commands" +.TH ZCAT "1" "April 2015" "zcat (zutils) 1.4-pre2" "User Commands" .SH NAME zcat \- decompress and concatenate files to standard output .SH SYNOPSIS @@ -38,8 +38,8 @@ equivalent to '\-vE' \fB\-E\fR, \fB\-\-show\-ends\fR display '$' at end of each line .TP -\fB\-\-format=\fR<fmt> -force given format (bz2, gz, lz, xz) +\fB\-M\fR, \fB\-\-format=\fR<list> +exclude formats not in <list> .TP \fB\-n\fR, \fB\-\-number\fR number all output lines @@ -47,6 +47,9 @@ number all output lines \fB\-N\fR, \fB\-\-no\-rcfile\fR don't read runtime configuration file .TP +\fB\-O\fR, \fB\-\-force\-format=\fR<fmt> +force given format (bz2, gz, lz, xz) +.TP \fB\-q\fR, \fB\-\-quiet\fR suppress all messages .TP @@ -84,7 +87,7 @@ Report bugs to zutils\-bug@nongnu.org .br Zutils home page: http://www.nongnu.org/zutils/zutils.html .SH COPYRIGHT -Copyright \(co 2014 Antonio Diaz Diaz. +Copyright \(co 2015 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. @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.46.1. -.TH ZCMP "1" "August 2014" "zcmp (zutils) 1.3" "User Commands" +.TH ZCMP "1" "April 2015" "zcmp (zutils) 1.4-pre2" "User Commands" .SH NAME zcmp \- decompress and compare two files byte by byte .SH SYNOPSIS @@ -39,21 +39,24 @@ output version information and exit \fB\-b\fR, \fB\-\-print\-bytes\fR print differing bytes .TP -\fB\-\-format\fR=\fI\,[\/\fR<fmt1>][,<fmt2>] -force given formats (bz2, gz, lz, xz) -.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\-M\fR, \fB\-\-format=\fR<list> +exclude formats not in <list> +.TP \fB\-n\fR, \fB\-\-bytes=\fR<n> compare at most <n> bytes .TP \fB\-N\fR, \fB\-\-no\-rcfile\fR don't read runtime configuration file .TP +\fB\-O\fR, \fB\-\-force\-format\fR=\fI\,[\/\fR<f1>][,<f2>] +force given formats (bz2, gz, lz, xz) +.TP \fB\-q\fR, \fB\-\-quiet\fR suppress all messages .TP @@ -82,7 +85,7 @@ Report bugs to zutils\-bug@nongnu.org .br Zutils home page: http://www.nongnu.org/zutils/zutils.html .SH COPYRIGHT -Copyright \(co 2014 Antonio Diaz Diaz. +Copyright \(co 2015 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. diff --git a/doc/zdiff.1 b/doc/zdiff.1 index 5675471..f9dd2ca 100644 --- a/doc/zdiff.1 +++ b/doc/zdiff.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.46.1. -.TH ZDIFF "1" "August 2014" "zdiff (zutils) 1.3" "User Commands" +.TH ZDIFF "1" "April 2015" "zdiff (zutils) 1.4-pre2" "User Commands" .SH NAME zdiff \- decompress and compare two files line by line .SH SYNOPSIS @@ -57,15 +57,18 @@ try hard to find a smaller set of changes \fB\-E\fR, \fB\-\-ignore\-tab\-expansion\fR ignore changes due to tab expansion .TP -\fB\-\-format\fR=\fI\,[\/\fR<fmt1>][,<fmt2>] -force given formats (bz2, gz, lz, xz) -.TP \fB\-i\fR, \fB\-\-ignore\-case\fR ignore case differences in file contents .TP +\fB\-M\fR, \fB\-\-format=\fR<list> +exclude formats not in <list> +.TP \fB\-N\fR, \fB\-\-no\-rcfile\fR don't read runtime configuration file .TP +\fB\-O\fR, \fB\-\-force\-format\fR=\fI\,[\/\fR<f1>][,<f2>] +force given formats (bz2, gz, lz, xz) +.TP \fB\-p\fR, \fB\-\-show\-c\-function\fR show which C function each change is in .TP @@ -109,7 +112,7 @@ Report bugs to zutils\-bug@nongnu.org .br Zutils home page: http://www.nongnu.org/zutils/zutils.html .SH COPYRIGHT -Copyright \(co 2014 Antonio Diaz Diaz. +Copyright \(co 2015 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. diff --git a/doc/zgrep.1 b/doc/zgrep.1 index 20574aa..e032217 100644 --- a/doc/zgrep.1 +++ b/doc/zgrep.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.46.1. -.TH ZGREP "1" "August 2014" "zgrep (zutils) 1.3" "User Commands" +.TH ZGREP "1" "April 2015" "zgrep (zutils) 1.4-pre2" "User Commands" .SH NAME zgrep \- search compressed files for a regular expression .SH SYNOPSIS @@ -57,9 +57,6 @@ obtain patterns from <file> \fB\-F\fR, \fB\-\-fixed\-strings\fR <pattern> is a set of newline\-separated strings .TP -\fB\-\-format=\fR<fmt> -force given format (bz2, gz, lz, xz) -.TP \fB\-h\fR, \fB\-\-no\-filename\fR suppress the prefixing filename on output .TP @@ -81,6 +78,9 @@ only print names of files containing no matches \fB\-m\fR, \fB\-\-max\-count=\fR<n> stop after <n> matches .TP +\fB\-M\fR, \fB\-\-format=\fR<list> +exclude formats not in <list> +.TP \fB\-n\fR, \fB\-\-line\-number\fR print the line number of each line .TP @@ -90,6 +90,9 @@ don't read runtime configuration file \fB\-o\fR, \fB\-\-only\-matching\fR show only the part of a line matching <pattern> .TP +\fB\-O\fR, \fB\-\-force\-format=\fR<fmt> +force given format (bz2, gz, lz, xz) +.TP \fB\-q\fR, \fB\-\-quiet\fR suppress all messages .TP @@ -127,7 +130,7 @@ Report bugs to zutils\-bug@nongnu.org .br Zutils home page: http://www.nongnu.org/zutils/zutils.html .SH COPYRIGHT -Copyright \(co 2014 Antonio Diaz Diaz. +Copyright \(co 2015 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. diff --git a/doc/ztest.1 b/doc/ztest.1 index 66ddc70..8eeaf4d 100644 --- a/doc/ztest.1 +++ b/doc/ztest.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.46.1. -.TH ZTEST "1" "August 2014" "ztest (zutils) 1.3" "User Commands" +.TH ZTEST "1" "April 2015" "ztest (zutils) 1.4-pre2" "User Commands" .SH NAME ztest \- verify integrity of compressed files .SH SYNOPSIS @@ -27,12 +27,15 @@ display this help and exit \fB\-V\fR, \fB\-\-version\fR output version information and exit .TP -\fB\-\-format=\fR<fmt> -force given format (bz2, gz, lz, xz) +\fB\-M\fR, \fB\-\-format=\fR<list> +exclude formats not in <list> .TP \fB\-N\fR, \fB\-\-no\-rcfile\fR don't read runtime configuration file .TP +\fB\-O\fR, \fB\-\-force\-format=\fR<fmt> +force given format (bz2, gz, lz, xz) +.TP \fB\-q\fR, \fB\-\-quiet\fR suppress all messages .TP @@ -58,7 +61,7 @@ Report bugs to zutils\-bug@nongnu.org .br Zutils home page: http://www.nongnu.org/zutils/zutils.html .SH COPYRIGHT -Copyright \(co 2014 Antonio Diaz Diaz. +Copyright \(co 2015 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. diff --git a/doc/zupdate.1 b/doc/zupdate.1 index 4f862f2..29ac253 100644 --- a/doc/zupdate.1 +++ b/doc/zupdate.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.46.1. -.TH ZUPDATE "1" "August 2014" "zupdate (zutils) 1.3" "User Commands" +.TH ZUPDATE "1" "April 2015" "zupdate (zutils) 1.4-pre2" "User Commands" .SH NAME zupdate \- recompress bzip2, gzip, xz files to lzip files .SH SYNOPSIS @@ -42,6 +42,9 @@ keep (don't delete) input files \fB\-l\fR, \fB\-\-lzip\-verbose\fR pass a \fB\-v\fR option to the lzip compressor .TP +\fB\-M\fR, \fB\-\-format=\fR<list> +exclude formats not in <list> +.TP \fB\-N\fR, \fB\-\-no\-rcfile\fR don't read runtime configuration file .TP @@ -73,7 +76,7 @@ Report bugs to zutils\-bug@nongnu.org .br Zutils home page: http://www.nongnu.org/zutils/zutils.html .SH COPYRIGHT -Copyright \(co 2014 Antonio Diaz Diaz. +Copyright \(co 2015 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. diff --git a/doc/zutils.info b/doc/zutils.info index ac3c7a5..83f07b7 100644 --- a/doc/zutils.info +++ b/doc/zutils.info @@ -12,12 +12,12 @@ File: zutils.info, Node: Top, Next: Introduction, Up: (dir) Zutils Manual ************* -This manual is for Zutils (version 1.3, 30 August 2014). +This manual is for Zutils (version 1.4-pre2, 30 April 2015). * 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 @@ -29,7 +29,7 @@ This manual is for Zutils (version 1.3, 30 August 2014). * Concept index:: Index of concepts - Copyright (C) 2009-2014 Antonio Diaz Diaz. + Copyright (C) 2009-2015 Antonio Diaz Diaz. This manual is free documentation: you have unlimited permission to copy, distribute and modify it. @@ -61,12 +61,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. +zutils. *Note compressor-requirements::. - FORMAT NOTE: If the '--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: +'zgrep foo -r --format=bz2,lz somedir'. + + FORMAT NOTE 2: If the '--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: -'zcmp --format=gz file.Z file.lz'. +'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 @@ -107,6 +111,26 @@ described here. '--version' Print the version number on the standard output and exit. +'-M FORMAT_LIST' +'--format=FORMAT_LIST' + Exclude formats not listed in the comma-separated FORMAT_LIST. + Valid formats are 'bz2', 'gz', 'lz', 'xz' 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 + 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 FORMAT_LIST enables file names with the following + extensions: + + bz2 enables .bz2 .tbz .tbz2 + gz enables .gz .tgz + lz enables .lz .tlz + xz enables .xz .txz + un enables any other file name + '-N' '--no-rcfile' Don't read the runtime configuration file 'zutilsrc'. @@ -116,9 +140,9 @@ described here. '--lz=COMMAND' '--xz=COMMAND' Set program (may include arguments) to be used as (de)compressor - for the given format. These options override the values set in - 'zutilsrc'. The compression program used must meet three - requirements: + for the given format. The mane 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 '-d' option, it must read compressed data from the standard input and produce decompressed data on @@ -197,16 +221,19 @@ Exit status is 0 if no errors occurred, non-zero otherwise. '--show-ends' Print a '$' after the end of each line. -'--format=FMT' - Force the given compression format. Valid values for FMT are - 'bz2', 'gz', 'lz' and 'xz'. If this option is used, the exact file - name must be given. Other names won't be tried. - '-n' '--number' Number all output lines, starting with 1. The line count is unlimited. +'-O FORMAT' +'--force-format=FORMAT' + Force the given compression format. 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. + '-q' '--quiet' Quiet operation. Suppress all messages. @@ -276,14 +303,6 @@ differences were found, and 2 means trouble. a letter, and precede bytes larger than 127 with 'M-' (which stands for "meta"). -'--format=[FMT1][,FMT2]' - Force the given compression formats. Any of FMT1 or FMT2 may be - omitted and the corresponding format will be automatically - detected. Valid values for FMT are 'bz2', 'gz', 'lz' and 'xz'. If - at least one format is specified with this option, the exact file - names of both FILE1 and FILE2 must be given. Other names won't be - tried. - '-i SIZE' '--ignore-initial=SIZE' Ignore any differences in the first SIZE bytes of the input files. @@ -303,6 +322,16 @@ differences were found, and 2 means trouble. '--bytes=COUNT' Compare at most COUNT input bytes. +'-O [FORMAT1][,FORMAT2]' +'--force-format=[FORMAT1][,FORMAT2]' + Force the given compression formats. 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. + '-q' '-s' '--quiet' @@ -321,7 +350,7 @@ Zdiff compares two files ('-' 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: @@ -372,18 +401,20 @@ differences were found, and 2 means trouble. '--ignore-tab-expansion' Ignore changes due to tab expansion. -'--format=[FMT1][,FMT2]' - Force the given compression formats. Any of FMT1 or FMT2 may be - omitted and the corresponding format will be automatically - detected. Valid values for FMT are 'bz2', 'gz', 'lz' and 'xz'. If - at least one format is specified with this option, the exact file - names of both FILE1 and FILE2 must be given. Other names won't be - tried. - '-i' '--ignore-case' Ignore case differences in file contents. +'-O [FORMAT1][,FORMAT2]' +'--force-format=[FORMAT1][,FORMAT2]' + Force the given compression formats. 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. + '-p' '--show-c-function' Show which C function each change is in. @@ -483,19 +514,14 @@ matches were found, and 2 means trouble. '--fixed-strings' Treat PATTERN as a set of newline-separated strings. -'--format=FMT' - Force the given compression format. Valid values for FMT are - 'bz2', 'gz', 'lz' and 'xz'. If this option is used, the exact file - name must be given. Other names won't be tried. - '-h' '--no-filename' - Suppress the prefixing of filenames on output when multiple files + Suppress the prefixing of file names on output when multiple files are searched. '-H' '--with-filename' - Print the filename for each match. + Print the file name for each match. '-i' '--ignore-case' @@ -524,6 +550,14 @@ matches were found, and 2 means trouble. '--only-matching' Show only the part of matching lines that actually matches PATTERN. +'-O FORMAT' +'--force-format=FORMAT' + Force the given compression format. 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. + '-q' '--quiet' Suppress all messages. Exit immediately with zero status if any @@ -577,10 +611,15 @@ environmental problems (file not found, invalid flags, I/O errors, etc), Ztest supports the following options: -'--format=FMT' - Force the given compression format. Valid values for FMT are - 'bz2', 'gz', 'lz' and 'xz'. If this option is used, all files not - in the given format will fail. +'-O FORMAT' +'--force-format=FORMAT' + Force the given compression format. 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. '-q' '--quiet' @@ -617,10 +656,20 @@ 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 '--force' and '--keep' options, 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', '.tbz', '.tbz2', '.gz', '.tgz', '.xz', '.txz'. The files produced have the extensions '.lz' or '.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: zupdate [OPTIONS] [FILES] @@ -708,17 +757,18 @@ Concept index Tag Table: Node: Top222 -Node: Introduction1128 -Node: Common options3475 -Node: The zutilsrc file4724 -Node: Zcat5650 -Node: Zcmp7572 -Node: Zdiff9896 -Node: Zgrep12399 -Node: Ztest15367 -Node: Zupdate16591 -Node: Problems18979 -Node: Concept index19513 +Node: Introduction1149 +Node: Common options3698 +Ref: compressor-requirements5451 +Node: The zutilsrc file5823 +Node: Zcat6749 +Node: Zcmp8796 +Node: Zdiff11256 +Node: Zgrep13896 +Node: Ztest16991 +Node: Zupdate18495 +Node: Problems21370 +Node: Concept index21904 End Tag Table 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 |