xref: /netbsd/usr.bin/gzip/zdiff.1 (revision 6550d01e)
1.\"	$NetBSD: zdiff.1,v 1.5 2010/04/14 19:52:05 wiz Exp $
2.\"	$OpenBSD: zdiff.1,v 1.2 2003/07/13 17:39:14 millert Exp $
3.\"
4.\" Copyright (c) 2003 Todd C. Miller <Todd.Miller@courtesan.com>
5.\" Copyright (c) 2010 Joerg Sonnenberger <joerg@NetBSD.org>
6.\"
7.\" Permission to use, copy, modify, and distribute this software for any
8.\" purpose with or without fee is hereby granted, provided that the above
9.\" copyright notice and this permission notice appear in all copies.
10.\"
11.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18.\"
19.\" Sponsored in part by the Defense Advanced Research Projects
20.\" Agency (DARPA) and Air Force Research Laboratory, Air Force
21.\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
22.\"
23.Dd April 14, 2010
24.Dt ZDIFF 1
25.Os
26.Sh NAME
27.Nm zcmp ,
28.Nm zdiff
29.Nd compare compressed files
30.Sh SYNOPSIS
31.Nm zcmp
32.Op Ar options
33.Ar file
34.Op Ar file2
35.Nm zdiff
36.Op Ar options
37.Ar file
38.Op Ar file2
39.Sh DESCRIPTION
40.Nm zcmp
41and
42.Nm zdiff
43are filters that invoke
44.Xr cmp 1
45or
46.Xr diff 1
47respectively to compare compressed files.
48Any
49.Ar options
50that are specified are passed to
51.Xr cmp 1
52or
53.Xr diff 1 .
54.Pp
55If only
56.Ar file1
57is specified, it is compared against a file with the same name, but
58with the extension removed.
59When both
60.Ar file1
61or
62.Ar file2
63are specified, either file may be compressed.
64.Pp
65Extensions handled by
66.Xr gzip 1 :
67.Bl -bullet -compact
68.It
69z, Z,
70.It
71gz,
72.It
73taz,
74.It
75tgz.
76.El
77.Pp
78Extensions handled by
79.Xr bzip2 1 :
80.Bl -bullet -compact
81.It
82bz,
83.It
84bz2,
85.It
86tbz,
87.It
88tbz2.
89.El
90.Pp
91Extensions handled by
92.Xr xz 1 :
93.Bl -bullet -compact
94.It
95lzma,
96.It
97xz,
98.It
99tlz,
100.It
101txz.
102.El
103.Sh ENVIRONMENT
104.Bl -tag -width "TMPDIR"
105.It Ev TMPDIR
106Directory in which to place temporary files.
107If unset,
108.Pa /tmp
109is used.
110.El
111.Sh FILES
112.Bl -tag -width "/tmp/zdiff.XXXXXXXXXX" -compact
113.It Pa /tmp/zcmp.XXXXXXXXXX
114Temporary file for
115.Nm zcmp .
116.It Pa /tmp/zdiff.XXXXXXXXXX
117Temporary file for
118.Nm zdiff .
119.El
120.Sh SEE ALSO
121.Xr bzip2 1 ,
122.Xr cmp 1 ,
123.Xr diff 1 ,
124.Xr gzip 1 ,
125.Xr xz 1
126.Sh CAVEATS
127.Nm zcmp
128and
129.Nm zdiff
130rely solely on the file extension to determine what is, or is not,
131a compressed file.
132Consequently, the following are not supported as arguments:
133.Bl -dash
134.It
135directories
136.It
137device special files
138.It
139filenames indicating the standard input
140.Pq Dq \-
141.El
142