xref: /openbsd/usr.bin/compress/gzexe.1 (revision 09467b48)
1.\"	$OpenBSD: gzexe.1,v 1.6 2013/08/12 14:19:53 jmc Exp $
2.\"
3.\" Copyright (c) 2003 Otto Moerbeek <otto@drijf.net>
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.Dd $Mdocdate: August 12 2013 $
18.Dt GZEXE 1
19.Os
20.Sh NAME
21.Nm gzexe
22.Nd create auto-decompressing executables
23.Sh SYNOPSIS
24.Nm gzexe
25.Op Fl d
26.Ar
27.Sh DESCRIPTION
28The
29.Nm
30utility uses
31.Xr gzip 1
32to compress executables, producing executables that decompress on-the-fly
33when executed.
34This saves disk space, at the cost of slower execution times.
35The original executables are saved by copying each of them to a file with
36the same name with a
37.Sq ~
38suffix appended.
39After verifying that the compressed executables work as expected, the backup
40files can be removed.
41.Pp
42The options are as follows:
43.Bl -tag -width Ds
44.It Fl d
45Decompress executables previously compressed by
46.Nm .
47.El
48.Pp
49The
50.Nm
51program refuses to compress non-regular or non-executable files,
52files with a setuid or setgid bit set, files that are already
53compressed using
54.Nm ,
55files in
56.Pa /bin
57or
58.Pa /sbin ,
59or programs it needs to perform on-the-fly decompression:
60.Xr sh 1 ,
61.Xr basename 1 ,
62.Xr mktemp 1 ,
63.Xr rm 1 ,
64.Xr echo 1 ,
65.Xr tail 1 ,
66.Xr gzip 1 ,
67and
68.Xr chmod 1 .
69.Sh SEE ALSO
70.Xr compress 1 ,
71.Xr gzip 1
72.Sh CAVEATS
73The
74.Nm
75utility replaces files by overwriting them with the generated
76compressed executable.
77To be able to do this, it is required that the original files are writable.
78