xref: /freebsd/usr.bin/gzip/zdiff.1 (revision f4aafb9ea6efd41efe05876d0e6ed70e46b425f0)
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.\" $FreeBSD$
24.Dd May 23, 2011
25.Dt ZDIFF 1
26.Os
27.Sh NAME
28.Nm zcmp ,
29.Nm zdiff
30.Nd compare compressed files
31.Sh SYNOPSIS
32.Nm zcmp
33.Op Ar options
34.Ar file
35.Op Ar file2
36.Nm zdiff
37.Op Ar options
38.Ar file
39.Op Ar file2
40.Sh DESCRIPTION
41.Nm zcmp
42and
43.Nm zdiff
44are filters that invoke
45.Xr cmp 1
46or
47.Xr diff 1
48respectively to compare compressed files.
49Any
50.Ar options
51that are specified are passed to
52.Xr cmp 1
53or
54.Xr diff 1 .
55.Pp
56If only
57.Ar file1
58is specified, it is compared against a file with the same name, but
59with the extension removed.
60When both
61.Ar file1
62or
63.Ar file2
64are specified, either file may be compressed.
65.Pp
66Extensions handled by
67.Xr gzip 1 :
68.Bl -bullet -compact
69.It
70z, Z,
71.It
72gz,
73.It
74taz,
75.It
76tgz.
77.El
78.Pp
79Extensions handled by
80.Xr bzip2 1 :
81.Bl -bullet -compact
82.It
83bz,
84.It
85bz2,
86.It
87tbz,
88.It
89tbz2.
90.El
91.Pp
92Extensions handled by
93.Xr xz 1 :
94.Bl -bullet -compact
95.It
96lzma,
97.It
98xz,
99.It
100tlz,
101.It
102txz.
103.El
104.Sh ENVIRONMENT
105.Bl -tag -width "TMPDIR"
106.It Ev TMPDIR
107Directory in which to place temporary files.
108If unset,
109.Pa /tmp
110is used.
111.El
112.Sh FILES
113.Bl -tag -width "/tmp/zdiff.XXXXXXXXXX" -compact
114.It Pa /tmp/zcmp.XXXXXXXXXX
115Temporary file for
116.Nm zcmp .
117.It Pa /tmp/zdiff.XXXXXXXXXX
118Temporary file for
119.Nm zdiff .
120.El
121.Sh SEE ALSO
122.Xr bzip2 1 ,
123.Xr cmp 1 ,
124.Xr diff 1 ,
125.Xr gzip 1 ,
126.Xr xz 1
127.Sh CAVEATS
128.Nm zcmp
129and
130.Nm zdiff
131rely solely on the file extension to determine what is, or is not,
132a compressed file.
133Consequently, the following are not supported as arguments:
134.Bl -dash
135.It
136directories
137.It
138device special files
139.It
140filenames indicating the standard input
141.Pq Dq \-
142.El
143