📄 065-070.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=065-070//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="056-065.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="071-079.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<P><FONT SIZE="+1"><B><I>FORMATS</I></B></FONT></P>
<TABLE WIDTH="100%">
<TR>
<TD WIDTH="20%"><B>%a</B>
<TD WIDTH="80%">Abbreviates the day of the week (Sun, Mon, etc.).
<TR>
<TD><B>%A</B>
<TD>Spells out the day of the week (Sunday, Monday, etc.).
<TR>
<TD VALIGN="TOP"><B>%b</B>
<TD>Abbreviates the month (Jan, Feb, etc.). The same as <B>%h</B>.
<TR>
<TD><B>%B</B>
<TD>Spells out the month (January, February, etc.).
<TR>
<TD><B>%c</B>
<TD>Returns the time for a specific country.
<TR>
<TD><B>%d</B>
<TD>Returns the day in two digits (01–31).
<TR>
<TD><B>%D</B>
<TD>Returns the date in <I>mm/dd/yy</I> format.
<TR>
<TD><B>%e</B>
<TD>Returns the day as a numeral (1–31).
<TR>
<TD VALIGN="TOP"><B>%h</B>
<TD>Abbreviates the month (Jan, Feb, etc.). The same as <B>%b</B>.
<TR>
<TD><B>%H</B>
<TD>Returns the hour in military time (00–23).
<TR>
<TD><B>%I</B>
<TD>Returns the hour in nonmilitary time (00–12).
<TR>
<TD><B>%j</B>
<TD>Returns the date in Julian format (1–365).
<TR>
<TD VALIGN="TOP"><B>%k</B>
<TD>Returns the hour in military time, without leading zeroes (1-23).
<TR>
<TD VALIGN="TOP"><B>%l</B>
<TD>Returns the hour in nonmilitary time, without leading zeroes (1–12).
<TR>
<TD VALIGN="TOP"><B>%m></B>
<TD>Returns the month as two numerals (01 for January, 02 for February, etc.).
<TR>
<TD><B>%M</B>
<TD>Returns the number of minutes (0–59).
<TR>
<TD><B>%n</B>
<TD>Inserts a newline.
<TR>
<TD VALIGN="TOP"><B>%p</B>
<TD>Changes time of day to a.m. and p.m. (as opposed to the default AM and PM.
<TR>
<TD><B>%r</B>
<TD>Returns <I>hh:mm:ss:a/pm</I> in 12-hour format.
<TR>
<TD VALIGN="TOP"><B>%s</B>
<TD>Returns the number since “The Epoch,” 1970-01-01 00:00:00 UTC.
<TR>
<TD><B>%S</B>
<TD>Returns the number of seconds (0–59).
<TR>
<TD><B>%t</B>
<TD>Inserts a tab.
<TR>
<TD><B>%T</B>
<TD>Specifies time returns in the <I>hh:mm:ss</I> format.
<TR>
<TD><B>%U</B>
<TD>Returns the day of the month (01–31).
<TR>
<TD><B>%w</B>
<TD>Returns the day of the week as a numeral (Sunday is 0).
<TR>
<TD VALIGN="TOP"><B>%W</B>
<TD>Returns the week as a number (0–51), with the week beginning on a Monday.
<TR>
<TD><B>%x</B>
<TD>Returns a country-specific time format.
<TR>
<TD><B>%X</B>
<TD>Returns a country-specific date format.
<TR>
<TD><B>%y</B>
<TD>Returns the year in two digits (97).
<TR>
<TD><B>%Y</B>
<TD>Returns the year in four digits (1997).
<TR>
<TD><B>%Z</B>
<TD>Returns a time-zone name.
</TABLE>
<P><FONT SIZE="+1"><B><I>DATE-SETTING OPTIONS</I></B></FONT></P>
<P>A privileged user can also use the <B>date</B> command to set a system date. The date can be numeric or nonnumeric format. A numeric string must be in the format <I>Mmddhhmmyy</I>.</P>
<P><FONT SIZE="+1"><B><I>EXAMPLE</I></B></FONT></P>
<!-- CODE SNIP //-->
<PRE>
$ date 0101153097
</PRE>
<!-- END CODE SNIP //-->
<P>This sets the date to January 1 (<I>0101</I>), 1997 (<I>97</I>), at 3:30 p.m. (<I>1530</I>).</P>
<P><FONT SIZE="+1"><B>dumpkeys......<TT>Keyboard Information</TT></B></FONT></P>
<P><B>dumpkeys</B> <I>option(s)</I></P>
<P><FONT SIZE="+1"><B><I>PURPOSE</I></B></FONT></P>
<P>The <B>dumpkeys</B> command returns information about the current keyboard driver.</P>
<P><FONT SIZE="+1"><B><I>OPTIONS</I></B></FONT></P>
<TABLE WIDTH="100%">
<TR>
<TD WIDTH="30%" VALIGN="TOP"><B>-ccharset</B>
<TD WIDTH="70%">Specifies a <I>charset</I> to interpret the returned values; <I>charset</I> must be <B>iso-8859-1</B> (ASCII English; the default), <B>iso-8859-2</B>, <B>iso-8859-3, iso-8859-4</B>, or <B>iso-8859-8</B>.
<TR>
<TD><B>--compose-only</B>
<TD>Returns information about key combinations.
<TR>
<TD VALIGN="TOP"><B>-f</B>
<TD>Prints the entire output for each key in canonical format.
<TR>
<TD><B>--funcs-only</B>
<TD>Returns information about function keys.
<TR>
<TD VALIGN="TOP"><B>-i</B>
<TD>Prints limited information about each key: acceptable keycode
<TR>
<TD>
<TD>keywords, the number of actions that can be bound to a key, the ranges of the action codes, and the number of function keys supported by the Linux kernel.
<TR>
<TD VALIGN="TOP"><B>--keys-only</B>
<TD>Returns information about key bindings, not string definitions.
<TR>
<TD VALIGN="TOP"><B>-l</B>
<TD>Prints information about each key: acceptable keycode keywords, the number of actions that can be bound to a key, the ranges of the action codes, the number of function keys supported by the Linux kernel, and the supported action symbols and their numeric values.
<TR>
<TD><B>-n</B>
<TD>Returns information in hexadecimal format.
</TABLE>
<P><FONT SIZE="+1"><B>echo......<TT>Echoes Input</TT></B></FONT></P>
<P><B>echo</B> <I>option string</I></P>
<P><FONT SIZE="+1"><B><I>PURPOSE</I></B></FONT></P>
<P>The <B>echo</B> command echoes text or a value to standard output, normally the screen. It actually exists in three versions: as a Linux command (<B>/bin/echo</B>), as a C shell command, and as a Bourne shell command. The three are used interchangeably. The only real difference is that the C shell version is much more limited not supporting control characters and the <B>-n</B> option, as they are here.</P>
<P><FONT SIZE="+1"><B><I>OPTION</I></B></FONT></P>
<TABLE WIDTH="100%">
<TR>
<TD WIDTH="20%"><B>-n</B>
<TD WIDTH="80%">Avoids printing of a newline at the end of the text.
</TABLE>
<P><FONT SIZE="+1"><B><I>CONTROL CHARACTER</I></B></FONT></P>
<TABLE WIDTH="100%">
<TR>
<TD WIDTH="20%"><B>\a</B>
<TD WIDTH="80%">Alert (bell).
<TR>
<TD><B>\b</B>
<TD>Backspace.
<TR>
<TD><B>\c</B>
<TD>No newline.
<TR>
<TD><B>\f</B>
<TD>Form feed.
<TR>
<TD><B>\n</B>
<TD>Newline.
<TR>
<TD><B>\r</B>
<TD>Carriage return.
<TR>
<TD><B>\t</B>
<TD>Horizontal tab.
<TR>
<TD><B>\v</B>
<TD>Vertical tab.
<TR>
<TD><B>\\</B>
<TD>Backslash.
<TR>
<TD><B>\nnn</B>
<TD>ASCII code of any character.
</TABLE>
<P><FONT SIZE="+1"><B><I>EXAMPLE</I></B></FONT></P>
<!-- CODE SNIP //-->
<PRE>
$ echo “Good afternoon!”
</PRE>
<!-- END CODE SNIP //-->
<P>This prints the string <I>Good afternoon!</I> to the screen.</P>
<!-- CODE SNIP //-->
<PRE>
$ echo “We are testing the printer” | lp
</PRE>
<!-- END CODE SNIP //-->
<P>This sends the string <I>We are testing the printer</I> to the printer.</P>
<P><FONT SIZE="+1"><B>env......<TT>Set Environment</TT></B></FONT></P>
<P><B>env</B> <I>option [variable=value] command</I></P>
<P><FONT SIZE="+1"><B><I>PURPOSE</I></B></FONT></P>
<P>The <B>env</B> command changes environment variables or displays the current environment variables with their values. Your Linux system has a set of variables that can be applied to various situation; for instance, instead of every command and program having its own text editor, most of them just summon the EDITOR environment variable and call a system editor. Other variables control the default shell, your terminal type, your command path, and your home directory.</P>
<P><FONT SIZE="+1"><B><I>OPTIONS</I></B></FONT></P>
<TABLE WIDTH="100%">
<TR>
<TD WIDTH="20%"><B>-</B>
<TD WIDTH="80%">Ignores the current environment entirely.
<TR>
<TD><B>-i</B>
<TD>Ignores the current environment entirely.
<TR>
<TD><B>u variable</B>
<TD>Unsets the specified <I>var</I>.
</TABLE>
<P><FONT SIZE="+1"><B>fsinfo......<TT>Font Server Info</TT></B></FONT></P>
<IMG SRC="images/05-07i.jpg"><P><B>fsinfo -server <I>servername</I></B></P>
<P><FONT SIZE="+1"><B><I>PURPOSE</I></B></FONT></P>
<P>The <B>fsinfo</B> command returns information about a running X Window System font server.</P>
<P><FONT SIZE="+1"><B><I>RELATED COMMANDS</I></B></FONT></P>
<DL>
<DD><B>fslsfonts
<DD>xfs</B>
</DL>
<P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="056-065.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="071-079.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 + -