📄 237-242.html
字号:
<HTML>
<HEAD>
<TITLE>Linux in Plain English:Linux Commands Organized by Group</TITLE>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!--ISBN=1558285423//-->
<!--TITLE=Linux in Plain English//-->
<!--AUTHOR=Patrick Volkerding//-->
<!--AUTHOR=Kevin Reichard//-->
<!--PUBLISHER=IDG Books Worldwide, Inc.//-->
<!--IMPRINT=M & T Books//-->
<!--CHAPTER=5//-->
<!--PAGES=237-242//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="232-237.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="242-247.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<P><FONT SIZE="+1"><B>gunzip......<TT>Unzip Compressed File</TT></B></FONT></P>
<IMG SRC="images/05-91i.jpg"><P><B>gunzip</B> <I>option(s) file(s)</I></P>
<P><FONT SIZE="+1"><B><I>PURPOSE</I></B></FONT></P>
<P>The <B>gunzip</B> command is used to unzip files compressed with the <B>gzip</B> command or the UNIX <B>compress</B> and <B>pack</B> commands.</P>
<BLOCKQUOTE>
<P><FONT SIZE="-1"><HR><B>NOTE: </B>There is no <B>compress</B> command with the Linux operating system, unlike other forms of UNIX. To uncompress a file compressed using the UNIX <B>compress</B> command, you should use <B>gunzip</B>.<HR></FONT>
</BLOCKQUOTE>
<P><FONT SIZE="+1"><B><I>OPTIONS</I></B></FONT></P>
<TABLE WIDTH="100%">
<TR>
<TD WIDTH="20%"><B>-c</B>
<TD WIDTH="80%">Uses standard output without changing the original files.
<TR>
<TD><B>-N</B>
<TD>Keeps the original name and timestamp.
<TR>
<TD><B>-q</B>
<TD>Works in quiet mode, without returning status information.
<TR>
<TD><B>-t</B>
<TD>Tests the new file for data integrity.
<TR>
<TD VALIGN="TOP"><B>-v</B>
<TD>Works in verbose mode, with all changes noted to the screen, including the name of the new file.
</TABLE>
<P><FONT SIZE="+1"><B><I>RELATED COMMANDS</I></B></FONT></P>
<DL>
<DD><B>gzip</B>
</DL>
<P><FONT SIZE="+1"><B>gzexe......<TT>Compress Executable</TT></B></FONT></P>
<IMG SRC="images/05-92i.jpg"><P><B>gzexe</B> <I>option file(s)</I></P>
<P><FONT SIZE="+1"><B><I>PURPOSE</I></B></FONT></P>
<P>The <B>gzexe</B> command compresses executable files. When you go to run the compressed executable file, it automatically uncompresses and is run. It takes a little longer to run compressed commands, but you can save on precious disk space.</P>
<P><FONT SIZE="+1"><B><I>OPTION</I></B></FONT></P>
<TABLE WIDTH="100%">
<TR>
<TD WIDTH="20%"><B>-d</B>
<TD WIDTH="80%">Decompresses compressed executable command.
</TABLE>
<P><FONT SIZE="+1"><B>gzip......<TT>Compress File</TT></B></FONT></P>
<IMG SRC="images/05-93i.jpg"><P><B>gzip</B> <I>option(s) file(s)</I></P>
<P><FONT SIZE="+1"><B><I>PURPOSE</I></B></FONT></P>
<P>The <B>gzip</B> command compresses a file using Lempel-Ziv coding. A compressed <I>file</I> is renamed <I>file.gz</I> and the original deleted. The access permissions and timestamps associated with the original file are maintained by the new compressed file.</P>
<P><FONT SIZE="+1"><B><I>OPTIONS</I></B></FONT></P>
<TABLE WIDTH="100%">
<TR>
<TD WIDTH="20%"><B>-c</B>
<TD WIDTH="80%">Uses standard output without changing the original files.
<TR>
<TD><B>-d</B>
<TD>Decompresses files (the same as <B>gunzip</B>).
<TR>
<TD VALIGN="TOP"><B>-f</B>
<TD>Forces compression in the cases when a compressed file already exists, has multiple links, or is already compressed.
<TR>
<TD VALIGN="TOP"><B>-l</B>
<TD>Creates compressed files out of files that are already compressed by <B>deflate</B>, <B>compress</B>, <B>gzip</B>, <B>lzh</B>, or <B>pack</B>.
<TR>
<TD><B>-N</B>
<TD>Keeps the original name and timestamp.
<TR>
<TD><B>-q</B>
<TD>Works in quiet mode, without returning status information.
<TR>
<TD VALIGN="TOP"><B>-r</B>
<TD>Works in recursive mode, where subdirectories are also compressed.
<TR>
<TD VALIGN="TOP"><B>-S <I>suffix</I></B>
<TD>Adds specified <I>suffix</I> to the new filename, instead of the default <I>.gz</I>.
<TR>
<TD><B>-t</B>
<TD>Tests the new file for data integrity.
<TR>
<TD VALIGN="TOP"><B>-v</B>
<TD>Works in verbose mode, with all changes noted to the screen, including the name of the new file.
</TABLE>
<P><FONT SIZE="+1"><B><I>RELATED COMMANDS</I></B></FONT></P>
<DL>
<DD><B>gunzip</B>
</DL>
<P><FONT SIZE="+1"><B>ln......<TT>Link Files</TT></B></FONT></P>
<P><B>ln</B> <I>option(s) originalfile linkfile</I></P>
<P><B>ln</B> <I>option(s) file(s) directory</I></P>
<P><FONT SIZE="+1"><B><I>PURPOSE</I></B></FONT></P>
<P>The <B>ln</B> command links two or more files. The purpose is to cut down on disk space used by files, and on a larger multiuser system there can be the same files that are used by multiple users in multiple situations. While you may not feel the need to link files on your single-user Linux system, you may feel the need if you’re overseeing a network installation. And Linux itself uses links in a standard installation; some Linux files are stored in nonstandard locations, but links make it appear that the standard locations are valid.</P>
<P>There are two types of links: hard links and symbolic links. For the most part, you’ll want to stick with symbolic links, as they’re easier to keep track of with the <B>ls</B> command.</P>
<P>You can keep the same name for both files, or else you can have a new name for the <I>linkfile</I>. Always remember that the first name is the original file and the second name is the new, link file; if you reverse the order you’ll trash your original file.</P>
<P><FONT SIZE="+1"><B><I>OPTIONS</I></B></FONT></P>
<TABLE WIDTH="100%">
<TR>
<TD WIDTH="20%"><B>-b</B>
<TD WIDTH="80%">Backs up the original file before removing it.
<TR>
<TD VALIGN="TOP"><B>-d</B>
<TD>Creates hard links to directories (available only to privileged users).
<TR>
<TD VALIGN="TOP"><B>-f</B>
<TD>Forces the link, without asking for permission to overwrite existing files.
<TR>
<TD VALIGN="TOP"><B>-F</B>
<TD>Creates hard links to directories (available only to privileged users).
<TR>
<TD><B>-i</B>
<TD>Confirms before overwriting existing files.
<TR>
<TD><B>-n</B>
<TD>Replaces symbolic links before dereferencing them.
<TR>
<TD><B>-s</B>
<TD>Creates a symbolic link.
<TR>
<TD VALIGN="TOP"><B>-S <I>suffix</I></B>
<TD>Adds <I>suffix</I> to the end of a backed-up file, instead of the standard tilde (~).
</TABLE>
<P><FONT SIZE="+1"><B><I>EXAMPLE</I></B></FONT></P>
<!-- CODE SNIP //-->
<PRE>
$ ln pat kevin
</PRE>
<!-- END CODE SNIP //-->
<P>This links the file <B>kevin</B> to <B>pat</B>.</P>
<P><FONT SIZE="+1"><B><I>RELATED COMMANDS</I></B></FONT></P>
<DL>
<DD><B>chmod</B>
<DD><B>chown</B>
<DD><B>cp</B>
<DD><B>ls</B>
<DD><B>mv</B>
</DL>
<P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="232-237.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="242-247.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -