This is zutils.info, produced by makeinfo version 4.13 from zutils.texinfo. INFO-DIR-SECTION Data Compression START-INFO-DIR-ENTRY * Zutils: (zutils). Utilities dealing with compressed files END-INFO-DIR-ENTRY  File: zutils.info, Node: Top, Next: Introduction, Up: (dir) Zutils Manual ************* This manual is for Zutils (version 1.0-rc7, 8 April 2013). * Menu: * Introduction:: Purpose and features of zutils * Zcat:: Concatenating compressed files * Zcmp:: Comparing compressed files byte by byte * Zdiff:: Comparing compressed files line by line * Zgrep:: Searching inside compressed files * Ztest:: Testing integrity of compressed files * Problems:: Reporting bugs * Concept Index:: Index of concepts Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013 Antonio Diaz Diaz. This manual is free documentation: you have unlimited permission to copy, distribute and modify it.  File: zutils.info, Node: Introduction, Next: Zcat, Prev: Top, Up: Top 1 Introduction ************** Zutils is a collection of utilities able to deal with any combination of compressed and non-compressed files transparently. If any given file, including standard input, is compressed, its uncompressed content is used. Compressed files are decompressed on the fly; no temporary files are created. These utilities are not wrapper scripts but safer and more efficient C++ programs. In particular the `--recursive' option is very efficient in those utilities supporting it. The provided utilities are zcat, zcmp, zdiff, zgrep and ztest. The supported formats are bzip2, gzip, lzip and xz. Zcat, zcmp, zdiff, and zgrep are improved replacements for the shell scripts provided with GNU gzip. Ztest is unique to zutils. Numbers given as arguments to options (positions, sizes) may be followed by a multiplier and an optional `B' for "byte". Table of SI and binary prefixes (unit multipliers): Prefix Value | Prefix Value k kilobyte (10^3 = 1000) | Ki kibibyte (2^10 = 1024) M megabyte (10^6) | Mi mebibyte (2^20) G gigabyte (10^9) | Gi gibibyte (2^30) T terabyte (10^12) | Ti tebibyte (2^40) P petabyte (10^15) | Pi pebibyte (2^50) E exabyte (10^18) | Ei exbibyte (2^60) Z zettabyte (10^21) | Zi zebibyte (2^70) Y yottabyte (10^24) | Yi yobibyte (2^80)  File: zutils.info, Node: Zcat, Next: Zcmp, Prev: Introduction, Up: Top 2 Zcat ****** Zcat copies each given file (`-' means standard input), to standard output. If any given file is compressed, its uncompressed content is used. If a given file does not exist, and its name does not end with one of the known extensions, zcat tries the compressed file names corresponding to the supported formats. If no files are specified, data is read from standard input, decompressed if needed, and sent to standard output. Data read from standard input must be of the same type; all uncompressed or all in the same compression format. The format for running zcat is: zcat [OPTIONS] [FILES] Exit status is 0 if no errors occurred, 1 otherwise. Zcat supports the following options: `-h' `--help' Print an informative help message describing the options and exit. `-V' `--version' Print the version number of zcat on the standard output and exit. `-A' `--show-all' Equivalent to `-vET'. `-b' `--number-nonblank' Number all nonblank output lines, starting with 1. The line count is unlimited. `-e' Equivalent to `-vE'. `-E' `--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. `-q' `--quiet' Quiet operation. Suppress all messages. `-r' `--recursive' Operate recursively on directories. `-s' `--squeeze-blank' Replace multiple adjacent blank lines with a single blank line. `-t' Equivalent to `-vT'. `-T' `--show-tabs' Print TAB characters as `^I'. `-v' `--show-nonprinting' Print control characters except for LF (newline) and TAB using `^' notation and precede characters larger than 127 with `M-' (which stands for "meta"). `--verbose' Verbose mode. Show error messages.  File: zutils.info, Node: Zcmp, Next: Zdiff, Prev: Zcat, Up: Top 3 Zcmp ****** Zcmp compares two files (`-' means standard input), and if they differ, tells the first byte and line number where they differ. Bytes and lines are numbered starting with 1. If any given file is compressed, its uncompressed content is used. Compressed files are decompressed on the fly; no temporary files are created. The format for running zcmp is: zcmp [OPTIONS] FILE1 [FILE2] This compares FILE1 to FILE2. If FILE2 is omitted zcmp tries the following: 1. If FILE1 is compressed, compares FILE1 to the file with the corresponding decompressed file name (removes the extension from FILE1). 2. If FILE1 is not compressed, compares FILE1 to the uncompressed contents of FILE1.[bz2|gz|lz|xz] (the first one that is found). 3. If no suitable file is found, compares FILE1 to data read from standard input. An exit status of 0 means no differences were found, 1 means some differences were found, and 2 means trouble. Zcmp supports the following options: `-h' `--help' Print an informative help message describing the options and exit. `-V' `--version' Print the version number of zcmp on the standard output and exit. `-b' `--print-bytes' Print the differing bytes. Print control bytes as a `^' followed by 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. Treat files with fewer than SIZE bytes as if they were empty. If SIZE is in the form `SIZE1,SIZE2', ignore the first SIZE1 bytes of the first input file and the first SIZE2 bytes of the second input file. `-l' `-v' `--list' `--verbose' Print the byte numbers (in decimal) and values (in octal) of all differing bytes. `-n COUNT' `--bytes=COUNT' Compare at most COUNT input bytes. `-q' `-s' `--quiet' `--silent' Do not print anything; only return an exit status indicating whether the files differ.  File: zutils.info, Node: Zdiff, Next: Zgrep, Prev: Zcmp, Up: Top 4 Zdiff ******* Zdiff compares two files (`-' means standard input), and if they differ, shows the differences line by line. If any given file is compressed, its uncompressed content is used. Zdiff is a front end to the diff program and has the limitation that messages from diff refer to temporary filenames instead of those specified. The format for running zdiff is: zdiff [OPTIONS] FILE1 [FILE2] This compares FILE1 to FILE2. If FILE2 is omitted zdiff tries the following: 1. If FILE1 is compressed, compares FILE1 to the file with the corresponding decompressed file name (removes the extension from FILE1). 2. If FILE1 is not compressed, compares FILE1 to the uncompressed contents of FILE1.[bz2|gz|lz|xz] (the first one that is found). 3. If no suitable file is found, compares FILE1 to data read from standard input. An exit status of 0 means no differences were found, 1 means some differences were found, and 2 means trouble. Zdiff supports the following options: `-h' `--help' Print an informative help message describing the options and exit. `-V' `--version' Print the version number of zdiff on the standard output and exit. `-a' `--text' Treat all files as text. `-b' `--ignore-space-change' Ignore changes in the amount of white space. `-B' `--ignore-blank-lines' Ignore changes whose lines are all blank. `-c' Use the context output format. `-C N' `--context=N' Same as -c but use N lines of context. `-d' `--minimal' Try hard to find a smaller set of changes. `-E' `--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. `-p' `--show-c-function' Show which C function each change is in. `-q' `--brief' Output only whether files differ. `-s' `--report-identical-files' Report when two files are identical. `-t' `--expand-tabs' Expand tabs to spaces in output. `-T' `--initial-tab' Make tabs line up by prepending a tab. `-u' Use the unified output format. `-U N' `--unified=N' Same as -u but use N lines of context. `-w' `--ignore-all-space' Ignore all white space.  File: zutils.info, Node: Zgrep, Next: Ztest, Prev: Zdiff, Up: Top 5 Zgrep ******* Zgrep is a front end to the grep program that allows transparent search on any combination of compressed and non-compressed files. If any given file is compressed, its uncompressed content is used. If a given file does not exist, and its name does not end with one of the known extensions, zgrep tries the compressed file names corresponding to the supported formats. If no files are specified, data is read from standard input, decompressed if needed, and fed to grep. Data read from standard input must be of the same type; all uncompressed or all in the same compression format. The format for running zgrep is: zgrep [OPTIONS] PATTERN [FILES] An exit status of 0 means at least one match was found, 1 means no matches were found, and 2 means trouble. Zgrep supports the following options: `--help' Print an informative help message describing the options and exit. `-V' `--version' Print the version number of zgrep on the standard output and exit. `-a' `--text' Treat all files as text. `-A N' `--after-context=N' Print N lines of trailing context. `-b' `--byte-offset' Print the byte offset of each line. `-B N' `--before-context=N' Print N lines of leading context. `-c' `--count' Only print a count of matching lines per file. `-C N' `--context=N' Print N lines of output context. `-e PATTERN' `--regexp=PATTERN' Use PATTERN as the pattern to match. `-E' `--extended-regexp' Treat PATTERN as an extended regular expression. `-f FILE' `--file=FILE' Obtain patterns from FILE, one per line. `-F' `--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 are searched. `-H' `--with-filename' Print the filename for each match. `-i' `--ignore-case' Ignore case distinctions. `-I' Ignore binary files. `-l' `--files-with-matches' Only print names of files containing at least one match. `-L' `--files-without-match' Only print names of files not containing any matches. `-m N' `--max-count=N' Stop after N matches. `-n' `--line-number' Prefix each matched line with its line number in the input file. `-o' `--only-matching' Show only the part of matching lines that actually matches PATTERN. `-q' `--quiet' Suppress all messages. `-r' `--recursive' Operate recursively on directories. `-s' `--no-messages' Suppress error messages. `-v' `--invert-match' Select non-matching lines. `--verbose' Verbose mode. Show error messages. `-w' `--word-regexp' Match only whole words. `-x' `--line-regexp' Match only whole lines.  File: zutils.info, Node: Ztest, Next: Problems, Prev: Zgrep, Up: Top 6 Ztest ******* Ztest verifies the integrity of the specified compressed files. Non-compressed files are ignored. If no files are specified, the integrity of compressed data read from standard input is verified. Data read from standard input must be all in the same compression format. Note that some xz files lack integrity information, and therefore can't be verified as reliably as the other formats can. The format for running ztest is: ztest [OPTIONS] [FILES] The exit status is 0 if all compressed files verify OK, 1 if environmental problems (file not found, invalid flags, I/O errors, etc), 2 if any compressed file is corrupt or invalid. Ztest supports the following options: `-h' `--help' Print an informative help message describing the options and exit. `-V' `--version' Print the version number of ztest on the standard output and exit. `--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. `-q' `--quiet' Quiet operation. Suppress all messages. `-r' `--recursive' Operate recursively on directories. `-v' `--verbose' Verbose mode. Show the verify status for each file processed. Further -v's increase the verbosity level.  File: zutils.info, Node: Problems, Next: Concept Index, Prev: Ztest, Up: Top 7 Reporting Bugs **************** There are probably bugs in zutils. There are certainly errors and omissions in this manual. If you report them, they will get fixed. If you don't, no one will ever know about them and they will remain unfixed for all eternity, if not longer. If you find a bug in zutils, please send electronic mail to . Include the version number, which you can find by running `zutils --version'.  File: zutils.info, Node: Concept Index, Prev: Problems, Up: Top Concept Index ************* [index] * Menu: * bugs: Problems. (line 6) * getting help: Problems. (line 6) * introduction: Introduction. (line 6) * zcat: Zcat. (line 6) * zcmp: Zcmp. (line 6) * zdiff: Zdiff. (line 6) * zgrep: Zgrep. (line 6) * ztest: Ztest. (line 6)  Tag Table: Node: Top224 Node: Introduction1005 Node: Zcat2592 Node: Zcmp4678 Node: Zdiff7164 Node: Zgrep9830 Node: Ztest12841 Node: Problems14245 Node: Concept Index14774  End Tag Table  Local Variables: coding: iso-8859-15 End: