SYNOPSIS

zdiff [\,options\/] \,file1 \/[\,file2\/]

DESCRIPTION

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.

The supported formats are bzip2, gzip, lzip and xz.

Compares <file1> to <file2>. If <file2> is omitted zdiff tries the following:

  • 1. If <file1> is compressed, compares its decompressed contents with the corresponding uncompressed file (the name of <file1> with the extension removed).

  • 2. If <file1> is uncompressed, compares it with the decompressed contents of <file1>.[lz|bz2|gz|xz] (the first one that is found).

  • 3. If no suitable file is found, compares <file1> with data read from standard input.

Exit status is 0 if inputs are identical, 1 if different, 2 if trouble.

OPTIONS

-h, --help

display this help and exit

-V, --version

output version information 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, --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 given formats (bz2, gz, lz, xz)

-i, --ignore-case

ignore case differences in file contents

-N, --no-rcfile

don't read runtime configuration file

-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, --unified=<n>

same as -u but use <n> lines of context

-w, --ignore-all-space

ignore all white space

--bz2=<command>

set compressor and options for bzip2 format

--gz=<command>

set compressor and options for gzip format

--lz=<command>

set compressor and options for lzip format

--xz=<command>

set compressor and options for xz format

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...

REPORTING BUGS

Report bugs to [email protected]

Zutils home page: http://www.nongnu.org/zutils/zutils.html

COPYRIGHT

Copyright © 2014 Antonio Diaz Diaz. License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.