1*86d7f5d3SJohn Marino.\" $NetBSD: gzexe.1,v 1.2 2003/12/28 12:43:43 wiz Exp $ 2*86d7f5d3SJohn Marino.\" $OpenBSD: gzexe.1,v 1.5 2007/05/31 19:20:08 jmc Exp $ 3*86d7f5d3SJohn Marino.\" $DragonFly: src/usr.bin/gzip/gzexe.1,v 1.2 2007/07/29 17:27:45 swildner Exp $ 4*86d7f5d3SJohn Marino.\" 5*86d7f5d3SJohn Marino.\" Copyright (c) 2003 Otto Moerbeek <otto@drijf.net> 6*86d7f5d3SJohn Marino.\" 7*86d7f5d3SJohn Marino.\" Permission to use, copy, modify, and distribute this software for any 8*86d7f5d3SJohn Marino.\" purpose with or without fee is hereby granted, provided that the above 9*86d7f5d3SJohn Marino.\" copyright notice and this permission notice appear in all copies. 10*86d7f5d3SJohn Marino.\" 11*86d7f5d3SJohn Marino.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 12*86d7f5d3SJohn Marino.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 13*86d7f5d3SJohn Marino.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 14*86d7f5d3SJohn Marino.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 15*86d7f5d3SJohn Marino.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 16*86d7f5d3SJohn Marino.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 17*86d7f5d3SJohn Marino.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 18*86d7f5d3SJohn Marino.\" 19*86d7f5d3SJohn Marino.Dd July 18, 2009 20*86d7f5d3SJohn Marino.Dt GZEXE 1 21*86d7f5d3SJohn Marino.Os 22*86d7f5d3SJohn Marino.Sh NAME 23*86d7f5d3SJohn Marino.Nm gzexe 24*86d7f5d3SJohn Marino.Nd create auto-decompressing executables 25*86d7f5d3SJohn Marino.Sh SYNOPSIS 26*86d7f5d3SJohn Marino.Nm 27*86d7f5d3SJohn Marino.Op Fl d 28*86d7f5d3SJohn Marino.Ar 29*86d7f5d3SJohn Marino.Sh DESCRIPTION 30*86d7f5d3SJohn MarinoThe 31*86d7f5d3SJohn Marino.Nm 32*86d7f5d3SJohn Marinoutility uses 33*86d7f5d3SJohn Marino.Xr gzip 1 34*86d7f5d3SJohn Marinoto compress executables, producing executables that decompress on-the-fly 35*86d7f5d3SJohn Marinowhen executed. 36*86d7f5d3SJohn MarinoThis saves disk space, at the cost of slower execution times. 37*86d7f5d3SJohn MarinoThe original executables are saved by copying each of them to a file with 38*86d7f5d3SJohn Marinothe same name with a 39*86d7f5d3SJohn Marino.Sq ~ 40*86d7f5d3SJohn Marinosuffix appended. 41*86d7f5d3SJohn MarinoAfter verifying that the compressed executables work as expected, the backup 42*86d7f5d3SJohn Marinofiles can be removed. 43*86d7f5d3SJohn Marino.Pp 44*86d7f5d3SJohn MarinoThe options are as follows: 45*86d7f5d3SJohn Marino.Bl -tag -width Ds 46*86d7f5d3SJohn Marino.It Fl d 47*86d7f5d3SJohn MarinoDecompress executables previously compressed by 48*86d7f5d3SJohn Marino.Nm . 49*86d7f5d3SJohn Marino.El 50*86d7f5d3SJohn Marino.Pp 51*86d7f5d3SJohn MarinoThe 52*86d7f5d3SJohn Marino.Nm 53*86d7f5d3SJohn Marinoprogram refuses to compress non-regular or non-executable files, 54*86d7f5d3SJohn Marinofiles with a setuid or setgid bit set, files that are already 55*86d7f5d3SJohn Marinocompressed using 56*86d7f5d3SJohn Marino.Nm , 57*86d7f5d3SJohn Marinofiles in /bin or /sbin, 58*86d7f5d3SJohn Marinoor programs it needs to perform on-the-fly decompression: 59*86d7f5d3SJohn Marino.Xr sh 1 , 60*86d7f5d3SJohn Marino.Xr basename 1 , 61*86d7f5d3SJohn Marino.Xr mktemp 1 , 62*86d7f5d3SJohn Marino.Xr rm 1 , 63*86d7f5d3SJohn Marino.Xr echo 1 , 64*86d7f5d3SJohn Marino.Xr tail 1 , 65*86d7f5d3SJohn Marino.Xr gzip 1 , 66*86d7f5d3SJohn Marinoand 67*86d7f5d3SJohn Marino.Xr chmod 1 . 68*86d7f5d3SJohn Marino.Sh SEE ALSO 69*86d7f5d3SJohn Marino.Xr gzip 1 70*86d7f5d3SJohn Marino.Sh CAVEATS 71*86d7f5d3SJohn MarinoThe 72*86d7f5d3SJohn Marino.Nm 73*86d7f5d3SJohn Marinoutility replaces files by overwriting them with the generated 74*86d7f5d3SJohn Marinocompressed executable. 75*86d7f5d3SJohn MarinoTo be able to do this, it is required that the original files are writable. 76