📄 292-297.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=292-297//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="287-291.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="298-303.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<P><FONT SIZE="+1"><B>emacs......<TT>Text Editor</TT></B></FONT></P>
<IMG SRC="images/05-110i.jpg"><BR><IMG SRC="images/05-111i.jpg"><P><B>emacs</B> <I>option(s) filename(s)</I></P>
<P><FONT SIZE="+1"><B><I>PURPOSE</I></B></FONT></P>
<P>The <B>emacs</B> command launches a text editor. Most Linux distributions install <B>emacs</B> to work under the X Window System, but it can be installed and configured to work under a terminal interface.</P>
<P>The full documentation to <B>emacs</B> can be found online using the <B>info</B> command.</P>
<P><FONT SIZE="+1"><B><I>OPTIONS</I></B></FONT></P>
<TABLE WIDTH="100%">
<TR>
<TD WIDTH="25%"><B>+<I>number</I></B>
<TD WIDTH="75%">Opens the file on line <I>number</I>.
<TR>
<TD VALIGN="TOP"><B>-font <I>font</I></B>
<TD>Specifies a fixed-width <I>font</I> for the window. (Used with X.)
<TR>
<TD VALIGN="TOP"><B>-i</B>
<TD>Uses the kitchen sink bitmap icon when iconifying the <B>emacs</B> window. (Used with X.)
<TR>
<TD><B>-name <I>name</I></B>
<TD>Specifies a <I>name</I> for the initial X window.
<TR>
<TD><B>-nw</B>
<TD>Works with terminal interface under X.
<TR>
<TD><B>-q</B>
<TD>Doesn’t load an <B>init</B> file.
<TR>
<TD><B>-r</B>
<TD>Displays in reverse video. (Used with X.)
<TR>
<TD VALIGN="TOP"><B>-t <I>file</I></B>
<TD>Uses <I>file</I> as the terminal instead of standard input/output.
<TR>
<TD><B>-title <I>title</I></B>
<TD>Specifies a <I>title</I> for the initial X window.
<TR>
<TD><B>-u <I>user</I></B>
<TD>Loads <I>user</I>’s <B>init</B> file.
</TABLE>
<P><FONT SIZE="+1"><B><I>RELATED COMMANDS</I></B></FONT></P>
<DL>
<DD><B>elvis</B>
<DD><B>vi</B>
</DL>
<P><FONT SIZE="+1"><B>expand......<TT>Expand Tabs</TT></B></FONT></P>
<P><B>expand</B> <I>option(s) file(s)</I></P>
<P><FONT SIZE="+1"><B><I>PURPOSE</I></B></FONT></P>
<P>The <B>expand</B> command converts tabs to spaces.</P>
<P><FONT SIZE="+1"><B><I>OPTION</I></B></FONT></P>
<TABLE WIDTH="100%">
<TR>
<TD WIDTH="20%"><B>-i</B>
<TD WIDTH="80%">Converts only tabs at the beginning of lines.
</TABLE>
<P><FONT SIZE="+1"><B>fgrep......<TT>Fast Grep</TT></B></FONT></P>
<P><B>fgrep</B> <I>option(s) pattern file(s)</I></P>
<P><FONT SIZE="+1"><B><I>PURPOSE</I></B></FONT></P>
<P>The <B>fgrep</B> command searches files for text (referred to as <I>patterns</I> or <I>expressions</I>) in multiple files or a single file. It is a cousin to the <B>egrep</B> and <B>grep</B> commands and usually is considered the simplest of the three. It returns a 0 if any lines match, 1 if no lines match, and 2 if it encounters an error.</P>
<P><FONT SIZE="+1"><B><I>OPTIONS</I></B></FONT></P>
<TABLE WIDTH="100%">
<TR>
<TD WIDTH="20%"><B>-A <I>num</I></B>
<TD WIDTH="80%">Displays <I>num</I> of lines after the matched pattern.
<TR>
<TD><B>-B <I>num</I></B>
<TD>Displays <I>num</I> of lines before the matched pattern.
<TR>
<TD><B>-b</B>
<TD>Returns the block number of the matched line.
<TR>
<TD VALIGN="TOP"><B>-c</B>
<TD>Returns the number of matches without listing the actual matches.
<TR>
<TD><B>-C</B>
<TD>Displays two lines before and after the matched pattern.
<TR>
<TD VALIGN="TOP"><B>-e <I>pattern</I></B>
<TD>Searches for <I>pattern</I> when <I>pattern</I> begins with a hyphen (-).
<TR>
<TD><B>-f <I>file</I></B>
<TD>Uses a <I>pattern</I> from <I>file</I>.
<TR>
<TD VALIGN="TOP"><B>-h</B>
<TD>Lists lines with matches without listing the files that contain them.
<TR>
<TD><B>-i</B>
<TD>Ignores case when matching.
<TR>
<TD VALIGN="TOP"><B>-l</B>
<TD>Lists files with matches without listing the actual matches.
<TR>
<TD><B>-L</B>
<TD>Lists files that don’t contain matching lines.
<TR>
<TD><B>-n</B>
<TD>Lists matched lines and their line numbers.
<TR>
<TD><B>-v</B>
<TD>Lists lines that do not match the pattern.
<TR>
<TD><B>-w</B>
<TD>Lists only whole words that are matched.
<TR>
<TD><B>-x</B>
<TD>Lists only whole lines that are matched.
<TR>
<TD><B>-<I>num</I></B>
<TD>Displays <I>num</I> lines before and after the matched pattern.
</TABLE>
<P><FONT SIZE="+1"><B><I>RELATED COMMANDS</I></B></FONT></P>
<DL>
<DD><B>egrep</B>
<DD><B>grep</B>
</DL>
<P><FONT SIZE="+1"><B>fmt......<TT>Format File</TT></B></FONT></P>
<P><B>fmt</B> <I>option(s) files</I></P>
<P><FONT SIZE="+1"><B><I>PURPOSE</I></B></FONT></P>
<P>The <B>fmt</B> command formats files by justifying the text to the right margin and eliminating newlines. However, the <B>fmt</B> command does preserve spacing, indentations, and blank lines from the original file.</P>
<P>Since this function is not performed by text editors, it’s usually invoked within the text editor (<B>elvis</B> has a mechanism for doing this) or piped from a text editor. In addition, because it’s often used to format a file and then sent directly to a printer, it usually exists as one step in a pipeline.</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%">Overrides formatting of the first two lines.
<TR>
<TD><B>-p <I>prefix</I></B>
<TD>Formats lines beginning with <I>prefix</I>.
<TR>
<TD><B>-s</B>
<TD>Overrides joining lines.
<TR>
<TD><B>-t</B>
<TD>Tags paragraphs.
<TR>
<TD VALIGN="TOP"><B>-u</B>
<TD>Applies uniform spacing of only one space between words and two spaces between sentences.
<TR>
<TD VALIGN="TOP"><B>-w <I>num</I></B>
<TD>Sets the line width to <I>num</I> characters; the default is 72.
</TABLE>
<P><FONT SIZE="+1"><B>fold......<TT>Format Page</TT></B></FONT></P>
<P><B>fold</B> <I>option(s) file(s)</I></P>
<P><FONT SIZE="+1"><B><I>PURPOSE</I></B></FONT></P>
<P>The <B>fold</B> command formats text to a specific width, breaking words in the middle to achieve that width. The default is 80 characters.</P>
<P><FONT SIZE="+1"><B><I>OPTIONS</I></B></FONT></P>
<TABLE WIDTH="100%">
<TR>
<TD WIDTH="20%" VALIGN="TOP"><B>-b</B>
<TD WIDTH="80%">Counts bytes instead of characters. Here, tabs and formatting commands (like backspace commands and carriage returns) are considered countable.
<TR>
<TD><B>-s</B>
<TD>Breaks only on spaces.
<TR>
<TD><B>-w <I>num</I></B>
<TD>Sets the line width to <I>num</I> characters; the default is 80.
</TABLE>
<P><FONT SIZE="+1"><B>ghostview......<TT>View PostScript File</TT></B></FONT></P>
<IMG SRC="images/05-112i.jpg"><P><B>ghostview</B> <I>option(s) filename</I></P>
<P><FONT SIZE="+1"><B><I>PURPOSE</I></B></FONT></P>
<P>The <B>ghostview</B> command displays PostScript files, using the <B>ghostscript</B> interpreter. A large number of options are associated with this command, but generally it is just invoked with a filename. (See the online-manual pages for more information on the many options.)</P><P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="287-291.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="298-303.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 + -