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