⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 terminalccmds.html

📁 Shall高级编程
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><HTML><HEAD><TITLE>Terminal Control Commands</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+"><LINKREL="HOME"TITLE="Advanced Bash-Scripting Guide"HREF="index.html"><LINKREL="UP"TITLE="External Filters, Programs and Commands"HREF="external.html"><LINKREL="PREVIOUS"TITLE="Communications Commands"HREF="communications.html"><LINKREL="NEXT"TITLE="Math Commands"HREF="mathc.html"><METAHTTP-EQUIV="Content-Style-Type"CONTENT="text/css"><LINKREL="stylesheet"HREF="common/kde-common.css"TYPE="text/css"><METAHTTP-EQUIV="Content-Type"CONTENT="text/html; charset=iso-8859-1"><METAHTTP-EQUIV="Content-Language"CONTENT="en"><LINKREL="stylesheet"HREF="common/kde-localised.css"TYPE="text/css"TITLE="KDE-English"><LINKREL="stylesheet"HREF="common/kde-default.css"TYPE="text/css"TITLE="KDE-Default"></HEAD><BODYCLASS="SECT1"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#AA0000"VLINK="#AA0055"ALINK="#AA0000"STYLE="font-family: sans-serif;"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">Advanced Bash-Scripting Guide: An in-depth exploration of the art of shell scripting</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="communications.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 15. External Filters, Programs and Commands</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="mathc.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="TERMINALCCMDS"></A>15.7. Terminal Control Commands</H1><DIVCLASS="VARIABLELIST"><P><B><ANAME="TERMCOMMANDLISTING1"></A>Command affecting the console	   or terminal</B></P><DL><DT><ANAME="TPUTREF"></A><BCLASS="COMMAND">tput</B></DT><DD><P>Initialize terminal and/or fetch information about it from	      <TTCLASS="FILENAME">terminfo</TT> data. Various options permit	      certain terminal operations.  <BCLASS="COMMAND">tput clear</B>	      is the equivalent of <BCLASS="COMMAND">clear</B>,	      below. <BCLASS="COMMAND">tput reset</B> is the equivalent	      of <AHREF="terminalccmds.html#RESETREF">reset</A>,	      below. <BCLASS="COMMAND">tput sgr0</B> also resets the	      terminal, but without clearing the screen.</P><P>	      <TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="90%"><TR><TD><PRECLASS="SCREEN"> <TTCLASS="PROMPT">bash$ </TT><TTCLASS="USERINPUT"><B>tput longname</B></TT> <TTCLASS="COMPUTEROUTPUT">xterm terminal emulator (XFree86 4.0 Window System)</TT> 	      </PRE></TD></TR></TABLE>	    </P><P>Issuing a <BCLASS="COMMAND">tput cup X Y</B> moves	      the cursor to the (X,Y) coordinates in the current	      terminal. A <BCLASS="COMMAND">clear</B> to erase the terminal	      screen would normally precede this.</P><P>Note that <AHREF="system.html#STTYREF">stty</A> offers	      a more powerful command set for controlling a terminal.</P></DD><DT><ANAME="INFOCMPREF"></A><BCLASS="COMMAND">infocmp</B></DT><DD><P>This command prints out extensive information about the	      current terminal. It references the	      <ICLASS="FIRSTTERM">terminfo</I> database.</P><P>	      <TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="90%"><TR><TD><PRECLASS="SCREEN"> <TTCLASS="PROMPT">bash$ </TT><TTCLASS="USERINPUT"><B>infocmp</B></TT> <TTCLASS="COMPUTEROUTPUT">#       Reconstructed via infocmp from file: /usr/share/terminfo/r/rxvt rxvt|rxvt terminal emulator (X Window System),          am, bce, eo, km, mir, msgr, xenl, xon,          colors#8, cols#80, it#8, lines#24, pairs#64,          acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,          bel=^G, blink=\E[5m, bold=\E[1m,         civis=\E[?25l,          clear=\E[H\E[2J, cnorm=\E[?25h, cr=^M,          ...</TT> 	      </PRE></TD></TR></TABLE>	    </P></DD><DT><ANAME="RESETREF"></A><BCLASS="COMMAND">reset</B></DT><DD><P>Reset terminal parameters and clear text screen. As with	    <BCLASS="COMMAND">clear</B>, the cursor and prompt reappear in the	    upper lefthand corner of the terminal.</P></DD><DT><ANAME="CLEARREF"></A><BCLASS="COMMAND">clear</B></DT><DD><P>The <BCLASS="COMMAND">clear</B> command simply clears	      the text screen at the console or in an	      <ICLASS="FIRSTTERM">xterm</I>. The prompt and cursor	      reappear at the upper lefthand corner of the screen or	      xterm window. This command may be used either at the command	      line or in a script. See <AHREF="testbranch.html#EX30">Example 10-25</A>.</P></DD><DT><ANAME="SCRIPTREF"></A><BCLASS="COMMAND">script</B></DT><DD><P>This utility records (saves to a file) all the user keystrokes at	      the command line in a console or an xterm window. This, in effect,	      creates a record of a session.</P></DD></DL></DIV></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="communications.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="index.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="mathc.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Communications Commands</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="external.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Math Commands</TD></TR></TABLE></DIV></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -