📄 zlibc.3
字号:
'\" t.TH uncompress.so 3 27mar1999 ZLIBC ZLIBC'\" t.de TQ.br.ns.TP \\$1...tr \(is'.tr \(if`.tr \(pd".ds St Zlibc.oh '\\*(St''%'.eh '%''\\*(St'.PP.SH Namezlibc - transparently access compressed files..PP.SH Introduction.PPThe zlibc package allows transparent on the fly uncompression of gzippedfiles. Your programs will be able to access any compressed file, justas if they were uncompressed. Zlibc will transparently uncompresses thedata from these files as soon as they are read, just as a compressedfilesystem would do. No kernel patch, no recompilation of theseexecutables and no recompilation of the libraries is needed..PPIt is not (yet) possible execute compressed files with zlibc. However,there is another package, called \fR\&\f(CWtcx\fR, which is able to uncompressexecutables on the fly. On the other hand \fR\&\f(CWtcx\fR isn't able touncompress data files on the fly. Fortunately, the both zlibc and tcxmay coexist on the same machine without problems..PP.SH WarningThis manpage has been automatically generated from zlibc's texinfodocumentation. However, this process is only approximative, and someitems, such as crossreferences, footnotes and indices are lost in thistranslation process. Indeed, this items have no appropriaterepresentation in the manpage format. Thus I strongly advise you to usethe original texinfo doc..TP* \ \ To generate a printable copy from the texinfo doc, run the followingcommands: .nf.ft 3.in +0.3i ./configure; make dvi; dvips zlibc.dvi.fi.in -0.3i.ft R.lp \&\fR.TP* \ \ To generate a html copy, run: .nf.ft 3.in +0.3i ./configure; make html.fi.in -0.3i.ft R.lp \&\fRA premade html can be found at:\&\fR\&\f(CW\(ifhttp://www.tux.org/pub/knaff/zlibc/zlibc.html\(is\fR.TP* \ \ To generate an info copy (browsable using emacs' info mode), run: .nf.ft 3.in +0.3i ./configure; make info.fi.in -0.3i.ft R.lp \&\fR.PPThe texinfo doc looks most pretty when printed or as html. Indeed, inthe info version certain examples are difficult to read due to thequoting conventions used in info..PP.iX "c bugs".iX "c ALPHA patches".iX "c patches".iX "c diffs".iX "c mailing list".PP.SH Where\ to\ get\ zlibc.PPZlibc can be found at the following places (and their mirrors): .nf.ft 3.in +0.3iftp://zlibc.linux.lu/zlibc-0.9j.tar.gzftp://www.tux.org/pub/knaff/zlibc/zlibc-0.9j.tar.gzftp://ibiblio.unc.edu/pub/Linux/libc/zlibc-0.9j.tar.gz.fi.in -0.3i.ft R.lp \&\fR.PPBefore reporting a bug, make sure that it has not yet been fixed in theAlpha patches which can be found at: .nf.ft 3.in +0.3ihttp://zlibc.linux.lu/http://www.tux.org/pub/knaff/zlibc.fi.in -0.3i.ft R.lp \&\fR.PPThese patches are named\&\fR\&\f(CWzlibc-\fR\fIversion\fR\fR\&\f(CW-\fR\fIddmm\fR\fR\&\f(CW.taz\fR, where versionstands for the base version, \fIdd\fR for the day and \fImm\fR for themonth. Due to a lack of space, I usually leave only the most recentpatch..PPThere is an zlibc mailing list at zlibc @ www.tux.org . Pleasesend all bug reports to this list. You may subscribe to the list bysending a message with 'subscribe zlibc @ www.tux.org' in itsbody to majordomo @ www.tux.org . (N.B. Please remove the spacesaround the "@" both times. I left them there in order to foolspambots.) Announcements of new zlibc versions will also be sent tothe list, in addition to the linux announce newsgroups. The mailinglist is archived at http://www.tux.org/hypermail/zlibc/latest.PP.SH Installing\ zlibc.iX "v LD_PRELOAD".iX "c Installation".iX "c Set-uid programs".iX "c Boot problems".TP1.\ If you install zlibc on Linux, make sure that your shared loader(ld-linux.so.1/ld.so) understands \fR\&\f(CWLD_PRELOAD\fR. (Best ifld.so-1.8.5 or more recent).TP2.\ Type \fR\&\f(CW./configure\fR. This runs the GNU autoconfigure script whichconfigures the \fR\&\f(CW\(ifMakefile\(is\fR and the \fR\&\f(CW\(ifconfig.h\(is\fR file. You maycompile time configuration options to \fR\&\f(CW./configure\fR, see fordetails..TP3.\ Type \fR\&\f(CWmake\fR to compile zlibc..TP4.\ Type \fR\&\f(CWmake install\fR to install zlibc and associated programs to itsfinal target..TP5.\ To use this module, set the environment variable \fR\&\f(CWLD_PRELOAD\fR topoint to the object. Example (sh syntax):.IP .nf.ft 3.in +0.3i LD_PRELOAD=/usr/local/lib/uncompress.o export LD_PRELOAD.fi.in -0.3i.ft R.lp \&\fR.IPor (csh syntax):.IP .nf.ft 3.in +0.3i setenv LD_PRELOAD /usr/local/lib/uncompress.o.fi.in -0.3i.ft R.lp \&\fROn linux, use /lib/uncompress.o instead of /usr/local/lib/uncompress.o ..IPYou might want to put these lines in your \fR\&\f(CW\(if.profile\(is\fR or\&\fR\&\f(CW\(if.cshrc\(is\fR in order to have the uncompressing functions available allthe time..TP6.\ Compress your files using gzip and enjoy.PPFor security reasons, the dynamic loader disregards environmentalvariables such as \fR\&\f(CWLD_PRELOAD\fR when executing set uid programs..PPHowever, on Linux, you can use zlibc with set uid programs too, by usingone of the two methods described below:.TP1.\ You may ing the path to \fR\&\f(CW\(ifuncompress.o\(is\fR into\&\fR\&\f(CW\(if/etc/ld.so.preload\(is\fR instead of using \fR\&\f(CWLD_PRELOAD\fR..IP\&\fBWARNING\fR: If you use \fR\&\f(CW\(if/etc/ld.so.preload\(is\fR, be sure toinstall \fR\&\f(CW\(ifuncompress.o\(is\fR on your root filesystem, for instance in\&\fR\&\f(CW/lib\fR, as is done by the default configuration. Using a directorywhich is not available at boot time, such as /usr/local/lib will causetrouble at the next reboot!.IPIt is also careful to remove zlibc from \fR\&\f(CW\(if/etc/ld.so.preload\(is\fR wheninstalling a new version. First test it out using \fR\&\f(CWLD_PRELOAD\fR,and only if everything is ok, put it back into\&\fR\&\f(CW\(if/etc/ld.so.preload\(is\fR. The zlibc package also supplies fourstatically linked programs \fR\&\f(CWsrm\fR, \fR\&\f(CWsmv\fR, \fR\&\f(CWsln\fR and\&\fR\&\f(CWssln\fR, which are equivalen to \fR\&\f(CWrm\fR, \fR\&\f(CWmv\fR, \fR\&\f(CWln\fR and\&\fR\&\f(CWln -s\fR. These can be used in case anything goes wrong with theinstallation..TP2.\ If you have a version of \fR\&\f(CWld.so\fR which is more recent than\&\fR\&\f(CW1.9.0\fR, you can set \fR\&\f(CWLD_PRELOAD\fR to just contain the basenameof \fR\&\f(CW\(ifuncompress.o\(is\fR without the directory. In that case, the file isfound as long as it is in the shared library path (which usuallycontains \fR\&\f(CW\(if/lib\(is\fR and \fR\&\f(CW\(if/usr/lib\(is\fR)). Because the search isrestricted to the library search path, this also works for set-uidprograms..IPExample (sh syntax):.IP .nf.ft 3.in +0.3i LD_PRELOAD=uncompress.o export LD_PRELOAD.fi.in -0.3i.ft R.lp \&\fR.IPor (csh syntax):.IP .nf.ft 3.in +0.3i setenv LD_PRELOAD uncompress.o.fi.in -0.3i.ft R.lp \&\fR.IPThe advantage of this approach over \fR\&\f(CW\(ifld.so.preload\(is\fR is that zlibccan more easily be switched off in case something goes wrong..PP.SH Using\ zlibc.iX "c Symbolic links".PPOnce zlibc is installed, simply compress your biggest datafilesusing gzip. Your programs are now able to uncompress these files on thefly whenever they need them..PP.SS Zlibc\ and\ links.PP.SS \ \ Symbolic\ links.PPAfter compressing your datafiles, you also need to change any potentialsymbolic links pointing to them. Let's suppose that \fR\&\f(CW\(ifx\(is\fR is asymlink to \fR\&\f(CW\(iftstfil\(is\fR:.PP .nf.ft 3.in +0.3i> echo 'this is a test' >tstfil> ln -s tstfil x> ls -ltotal 1-rw-r--r-- 1 alknaff sirac 15 Feb 25 19:40 tstfillrwxrwxrwx 1 alknaff sirac 8 Feb 25 19:40 x -> tstfil.fi.in -0.3i.ft R.lp \&\fR.PPAfter compressing it, you'll see the following listing:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -