1.\" $OpenBSD: zdiff.1,v 1.7 2019/01/25 00:19:26 millert Exp $ 2.\" 3.\" Copyright (c) 2003 Todd C. Miller <millert@openbsd.org> 4.\" 5.\" Permission to use, copy, modify, and distribute this software for any 6.\" purpose with or without fee is hereby granted, provided that the above 7.\" copyright notice and this permission notice appear in all copies. 8.\" 9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16.\" 17.\" Sponsored in part by the Defense Advanced Research Projects 18.\" Agency (DARPA) and Air Force Research Laboratory, Air Force 19.\" Materiel Command, USAF, under agreement number F39502-99-1-0512. 20.\" 21.Dd $Mdocdate: January 25 2019 $ 22.Dt ZDIFF 1 23.Os 24.Sh NAME 25.Nm zcmp , 26.Nm zdiff 27.Nd compare compressed files 28.Sh SYNOPSIS 29.Nm zcmp 30.Op Ar options 31.Ar file1 32.Op Ar file2 33.Nm zdiff 34.Op Ar options 35.Ar file1 36.Op Ar file2 37.Sh DESCRIPTION 38.Nm zcmp 39and 40.Nm zdiff 41are filters that invoke 42.Xr cmp 1 43or 44.Xr diff 1 45respectively to compare compressed files. 46Such files generally have a 47.Dq Z 48or 49.Dq gz 50extension (both the 51.Xr compress 1 52and 53.Xr gzip 1 54formats are supported). 55Any 56.Ar options 57that are specified are passed to 58.Xr cmp 1 59or 60.Xr diff 1 . 61.Pp 62If only 63.Ar file1 64is specified, it is compared against a file with the same name, but 65with the extension removed. 66When both 67.Ar file1 68or 69.Ar file2 70are specified, either file may be compressed. 71.Sh ENVIRONMENT 72.Bl -tag -width "TMPDIR" 73.It Ev TMPDIR 74Directory in which to place temporary files. 75If unset, 76.Pa /tmp 77is used. 78.El 79.Sh FILES 80.Bl -tag -width "/tmp/zdiff.XXXXXXXXXX" -compact 81.It Pa /tmp/zcmp.XXXXXXXXXX 82Temporary file for 83.Nm zcmp . 84.It Pa /tmp/zdiff.XXXXXXXXXX 85Temporary file for 86.Nm zdiff . 87.El 88.Sh SEE ALSO 89.Xr cmp 1 , 90.Xr compress 1 , 91.Xr diff 1 , 92.Xr gzip 1 93.Sh CAVEATS 94.Nm zcmp 95and 96.Nm zdiff 97rely solely on the file extension to determine what is, or is not, 98a compressed file. 99Consequently, the following are not supported as arguments: 100.Pp 101.Bl -dash -offset indent -compact 102.It 103directories 104.It 105device special files 106.It 107filenames indicating the standard input 108.Pq Sq - 109.El 110