summaryrefslogtreecommitdiffstats
path: root/doc/zdiff.1
blob: bbcdc944d621baffff57d06f8a87f4d82f094a44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.49.2.
.TH ZDIFF "1" "January 2024" "zutils 1.13" "User Commands"
.SH NAME
zdiff \- decompress and compare two files line by line
.SH SYNOPSIS
.B zdiff
[\fI\,options\/\fR] \fI\,file1 \/\fR[\fI\,file2\/\fR]
.SH DESCRIPTION
zdiff compares two files and, if they differ, writes to standard output the
differences line by line. A hyphen '\-' used as a file argument means standard
input. If any file given is compressed, its decompressed content is used.
zdiff is a front end to the program diff and has the limitation that messages
from diff refer to temporary file names instead of those specified.
.PP
\&'zdiff \fB\-v\fR \fB\-V\fR' prints the version of the diff program used.
.PP
The formats supported are bzip2, gzip, lzip, xz, and zstd.
.PP
zdiff compares file1 to file2. The standard input is used only if file1 or
file2 refers to standard input. If file2 is omitted zdiff tries to compare
file1 with the corresponding uncompressed file (if file1 is compressed), and
then with the corresponding compressed files of the remaining formats until
one is found.
.PP
Exit status is 0 if inputs are identical, 1 if different, 2 if trouble.
Some options only work if the diff program used supports them.
.SH OPTIONS
.TP
\fB\-h\fR, \fB\-\-help\fR
display this help and exit
.TP
\fB\-V\fR, \fB\-\-version\fR
output version information and exit
.TP
\fB\-a\fR, \fB\-\-text\fR
treat all files as text
.TP
\fB\-b\fR, \fB\-\-ignore\-space\-change\fR
ignore changes in the amount of white space
.TP
\fB\-B\fR, \fB\-\-ignore\-blank\-lines\fR
ignore changes whose lines are all blank
.TP
\fB\-c\fR
use the context output format
.TP
\fB\-C\fR, \fB\-\-context=\fR<n>
same as \fB\-c\fR but use <n> lines of context
.TP
\fB\-d\fR, \fB\-\-minimal\fR
try hard to find a smaller set of changes
.TP
\fB\-E\fR, \fB\-\-ignore\-tab\-expansion\fR
ignore changes due to tab expansion
.TP
\fB\-i\fR, \fB\-\-ignore\-case\fR
ignore case differences
.TP
\fB\-M\fR, \fB\-\-format=\fR<list>
process only the formats 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 one or both input formats
.TP
\fB\-p\fR, \fB\-\-show\-c\-function\fR
show which C function each change is in
.TP
\fB\-q\fR, \fB\-\-brief\fR
output only whether files differ
.TP
\fB\-s\fR, \fB\-\-report\-identical\-files\fR
report when two files are identical
.TP
\fB\-t\fR, \fB\-\-expand\-tabs\fR
expand tabs to spaces in output
.TP
\fB\-T\fR, \fB\-\-initial\-tab\fR
make tabs line up by prepending a tab
.TP
\fB\-u\fR
use the unified output format
.TP
\fB\-U\fR, \fB\-\-unified=\fR<n>
same as \fB\-u\fR but use <n> lines of context
.TP
\fB\-v\fR, \fB\-\-verbose\fR
verbose mode (for \fB\-\-version\fR)
.TP
\fB\-w\fR, \fB\-\-ignore\-all\-space\fR
ignore all white space
.TP
\fB\-W\fR, \fB\-\-width=\fR<n>
output at most <n> print columns (for \fB\-y\fR)
.TP
\fB\-y\fR, \fB\-\-side\-by\-side\fR
output in two columns
.TP
\fB\-\-bz2=\fR<command>
set compressor and options for bzip2 format
.TP
\fB\-\-gz=\fR<command>
set compressor and options for gzip format
.TP
\fB\-\-lz=\fR<command>
set compressor and options for lzip format
.TP
\fB\-\-xz=\fR<command>
set compressor and options for xz format
.TP
\fB\-\-zst=\fR<command>
set compressor and options for zstd format
.PP
Valid formats for options '\-M' and '\-O' are 'bz2', 'gz', 'lz', 'xz', 'zst',
and 'un' for uncompressed.
.SH "REPORTING BUGS"
Report bugs to zutils\-bug@nongnu.org
.br
Zutils home page: http://www.nongnu.org/zutils/zutils.html
.SH COPYRIGHT
Copyright \(co 2024 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.
There is NO WARRANTY, to the extent permitted by law.
.SH "SEE ALSO"
The full documentation for
.B zdiff
is maintained as a Texinfo manual.  If the
.B info
and
.B zdiff
programs are properly installed at your site, the command
.IP
.B info zutils
.PP
should give you access to the complete manual.