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

📄 ch41_01.htm

📁 the unix power tools
💻 HTM
字号:
<HTML><!--Distributed by F --><HEAD><TITLE>[Chapter 41] Terminal and Serial Line Settings</TITLE><METANAME="DC.title"CONTENT="UNIX Power Tools"><METANAME="DC.creator"CONTENT="Jerry Peek, Tim O'Reilly &amp; Mike Loukides"><METANAME="DC.publisher"CONTENT="O'Reilly &amp; Associates, Inc."><METANAME="DC.date"CONTENT="1998-08-04T21:51:47Z"><METANAME="DC.type"CONTENT="Text.Monograph"><METANAME="DC.format"CONTENT="text/html"SCHEME="MIME"><METANAME="DC.source"CONTENT="1-56592-260-3"SCHEME="ISBN"><METANAME="DC.language"CONTENT="en-US"><METANAME="generator"CONTENT="Jade 1.1/O'Reilly DocBook 3.0 to HTML 4.0"><LINKREV="made"HREF="mailto:online-books@oreilly.com"TITLE="Online Books Comments"><LINKREL="up"HREF="part07.htm"TITLE="VII. Terminals and Printers "><LINKREL="prev"HREF="part07.htm"TITLE="VII. Terminals and Printers "><LINKREL="next"HREF="ch41_02.htm"TITLE="41.2 stty and All That Stuff "></HEAD><BODYBGCOLOR="#FFFFFF"TEXT="#000000"><DIVCLASS="htmlnav"><H1><IMGSRC="gifs/smbanner.gif"ALT="UNIX Power Tools"USEMAP="#srchmap"BORDER="0"></H1><MAPNAME="srchmap"><AREASHAPE="RECT"COORDS="0,0,466,58"HREF="index.htm"ALT="UNIX Power Tools"><AREASHAPE="RECT"COORDS="467,0,514,18"HREF="jobjects/fsearch.htm"ALT="Search this book"></MAP><TABLEWIDTH="515"BORDER="0"CELLSPACING="0"CELLPADDING="0"><TR><TDALIGN="LEFT"VALIGN="TOP"WIDTH="172"><ACLASS="PART"HREF="part07.htm"TITLE="VII. Terminals and Printers "><IMGSRC="gifs/txtpreva.gif"SRC="gifs/txtpreva.gif"ALT="Previous: VII. Terminals and Printers "BORDER="0"></A></TD><TDALIGN="CENTER"VALIGN="TOP"WIDTH="171"><B><FONTFACE="ARIEL,HELVETICA,HELV,SANSERIF"SIZE="-1">Chapter 41</FONT></B></TD><TDALIGN="RIGHT"VALIGN="TOP"WIDTH="172"><ACLASS="SECT1"HREF="ch41_02.htm"TITLE="41.2 stty and All That Stuff "><IMGSRC="gifs/txtnexta.gif"SRC="gifs/txtnexta.gif"ALT="Next: 41.2 stty and All That Stuff "BORDER="0"></A></TD></TR></TABLE>&nbsp;<HRALIGN="LEFT"WIDTH="515"TITLE="footer"></DIV><DIVCLASS="CHAPTER"><H1CLASS="chapter"><ACLASS="title"NAME="UPT-CHP-41">41. Terminal and Serial Line Settings</A></H1><DIVCLASS="htmltoc"><P><B>Contents:</B><BR><ACLASS="sect1"HREF="#UPT-ART-1143"TITLE="41.1 Delving a Little Deeper ">Delving a Little Deeper </A><BR><ACLASS="sect1"HREF="ch41_02.htm"TITLE="41.2 stty and All That Stuff ">stty and All That Stuff </A><BR><ACLASS="sect1"HREF="ch41_03.htm"TITLE="41.3 Find Out Terminal Settings with stty ">Find Out Terminal Settings with stty </A><BR><ACLASS="sect1"HREF="ch41_04.htm"TITLE="41.4 How UNIX Handles TAB Characters ">How UNIX Handles TAB Characters </A><BR><ACLASS="sect1"HREF="ch41_05.htm"TITLE="41.5 Why Some Systems Backspace over Prompts ">Why Some Systems Backspace over Prompts </A><BR><ACLASS="sect1"HREF="ch41_06.htm"TITLE="41.6 Using sleep to Keep Port Settings ">Using sleep to Keep Port Settings </A><BR><ACLASS="sect1"HREF="ch41_07.htm"TITLE="41.7 Reading Verrrry Long Lines from the Terminal ">Reading Verrrry Long Lines from the Terminal </A><BR><ACLASS="sect1"HREF="ch41_08.htm"TITLE="41.8 ptys and Window Systems ">ptys and Window Systems </A><BR><ACLASS="sect1"HREF="ch41_09.htm"TITLE="41.9 Commands to Adjust Your Terminal ">Commands to Adjust Your Terminal </A><BR><ACLASS="sect1"HREF="ch41_10.htm"TITLE="41.10 Using terminfo Capabilities in Shell Programs ">Using terminfo Capabilities in Shell Programs </A><BR><ACLASS="sect1"HREF="ch41_11.htm"TITLE="41.11 How termcap and terminfo Describe Terminals ">How termcap and terminfo Describe Terminals </A><BR><ACLASS="sect1"HREF="ch41_12.htm"TITLE="41.12 Finding Out What Characters Your Terminal's Special Keys Send">Finding Out What Characters Your Terminal's Special Keys Send</A></P><P></P></DIV><DIVCLASS="sect1"><H2CLASS="sect1"><ACLASS="title"NAME="UPT-ART-1143">41.1 Delving a Little Deeper </A></H2><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-45313"></A><ACLASS="indexterm"NAME="AUTOID-45315"></A><ACLASS="indexterm"NAME="AUTOID-45317"></A><ACLASS="indexterm"NAME="AUTOID-45319"></A>Article<ACLASS="xref"HREF="ch05_02.htm"TITLE="The Idea of a Terminal Database ">5.2</A>and others introduce parts of UNIX terminal handling.This chapter contains several articles that show a little more abouthow UNIX handles terminals and other serial devices.Beginners don'talways realize that there are several overlapping mechanisms at work.Programs like <EMCLASS="emphasis">tset</EM> and <EMCLASS="emphasis">tput</EM>, and the <EMCLASS="emphasis">termcap</EM> and<EMCLASS="emphasis">terminfo</EM> databases they depend on, actually configure theterminal or window (or tell other programs about their characteristics), while <EMCLASS="emphasis">stty</EM> affects the operation of theUNIX device drivers that handle the serial line.From a user's pointof view, the distinction isn't always clear, especially since<EMCLASS="emphasis">tset</EM> does some of its work on both levels.</P><PCLASS="para">Perhaps we're continuing the confusion by putting informationabout both of these topics into the same chapters.Oh well.What we have here are a miscellany of topics that delve a littledeeper than we've gone before into how terminals work under UNIX.</P><ULCLASS="itemizedlist"><LICLASS="listitem"><PCLASS="para">Article<ACLASS="xref"HREF="ch41_02.htm"TITLE="stty and All That Stuff ">41.2</A>explains why <EMCLASS="emphasis">stty</EM> is as complex as it is.Article<ACLASS="xref"HREF="ch41_03.htm"TITLE="Find Out Terminal Settings with stty ">41.3</A>shows how to check <EMCLASS="emphasis">stty</EM>'s settings.</P></LI><LICLASS="listitem"><PCLASS="para">Article <ACLASS="xref"HREF="ch41_04.htm"TITLE="How UNIX Handles TAB Characters ">41.4</A>explains some of the mysteries of terminal tab handling.</P></LI><LICLASS="listitem"><PCLASS="para">Article<ACLASS="xref"HREF="ch41_05.htm"TITLE="Why Some Systems Backspace over Prompts ">41.5</A>lists differences in the way that System V and BSD UNIX handle what youtype on the command line.</P></LI><LICLASS="listitem"><PCLASS="para">Articles<ACLASS="xref"HREF="ch41_06.htm"TITLE="Using sleep to Keep Port Settings ">41.6</A>and <ACLASS="xref"HREF="ch41_07.htm"TITLE="Reading Verrrry Long Lines from the Terminal ">41.7</A>give two tips about <EMCLASS="emphasis">stty</EM>.</P></LI><LICLASS="listitem"><PCLASS="para">Article<ACLASS="xref"HREF="ch41_08.htm"TITLE="ptys and Window Systems ">41.8</A>explains how software designed for terminals still runs under windowsystems, using &quot;pseudo-terminals&quot; or <EMCLASS="emphasis">pty</EM>s.</P></LI><LICLASS="listitem"><PCLASS="para">Articles<ACLASS="xref"HREF="ch41_09.htm"TITLE="Commands to Adjust Your Terminal ">41.9</A>and<ACLASS="xref"HREF="ch41_10.htm"TITLE="Using terminfo Capabilities in Shell Programs ">41.10</A>describe how to issue escape sequences to change the behavior of yourterminal.</P></LI><LICLASS="listitem"><PCLASS="para">Article<ACLASS="xref"HREF="ch41_11.htm"TITLE="How termcap and terminfo Describe Terminals ">41.11</A>describes how to read a <EMCLASS="emphasis">termcap</EM> or <EMCLASS="emphasis">terminfo</EM> entry.</P></LI><LICLASS="listitem"><PCLASS="para">Article<ACLASS="xref"HREF="ch41_12.htm"TITLE="Finding Out What Characters Your Terminal's Special Keys Send">41.12</A>describes how to avoid reading <EMCLASS="emphasis">termcap</EM> and <EMCLASS="emphasis">terminfo</EM>entries.</P></LI><LICLASS="listitem"><PCLASS="para">Article<ACLASS="xref"HREF="ch42_01.htm#UPT-ART-1142"TITLE="Making Sense Out of the Terminal Mess ">42.1</A>introduces more low-level concepts.</P></LI></UL><DIVCLASS="sect1info"><PCLASS="SECT1INFO">- <SPANCLASS="authorinitials">TOR</SPAN></P></DIV></DIV></DIV><DIVCLASS="htmlnav"><P></P><HRALIGN="LEFT"WIDTH="515"TITLE="footer"><TABLEWIDTH="515"BORDER="0"CELLSPACING="0"CELLPADDING="0"><TR><TDALIGN="LEFT"VALIGN="TOP"WIDTH="172"><ACLASS="PART"HREF="part07.htm"TITLE="VII. Terminals and Printers "><IMGSRC="gifs/txtpreva.gif"SRC="gifs/txtpreva.gif"ALT="Previous: VII. Terminals and Printers "BORDER="0"></A></TD><TDALIGN="CENTER"VALIGN="TOP"WIDTH="171"><ACLASS="book"HREF="index.htm"TITLE="UNIX Power Tools"><IMGSRC="gifs/txthome.gif"SRC="gifs/txthome.gif"ALT="UNIX Power Tools"BORDER="0"></A></TD><TDALIGN="RIGHT"VALIGN="TOP"WIDTH="172"><ACLASS="SECT1"HREF="ch41_02.htm"TITLE="41.2 stty and All That Stuff "><IMGSRC="gifs/txtnexta.gif"SRC="gifs/txtnexta.gif"ALT="Next: 41.2 stty and All That Stuff "BORDER="0"></A></TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"WIDTH="172">VII. Terminals and Printers </TD><TDALIGN="CENTER"VALIGN="TOP"WIDTH="171"><ACLASS="index"HREF="index/idx_0.htm"TITLE="Book Index"><IMGSRC="gifs/index.gif"SRC="gifs/index.gif"ALT="Book Index"BORDER="0"></A></TD><TDALIGN="RIGHT"VALIGN="TOP"WIDTH="172">41.2 stty and All That Stuff </TD></TR></TABLE><HRALIGN="LEFT"WIDTH="515"TITLE="footer"><IMGSRC="gifs/smnavbar.gif"SRC="gifs/smnavbar.gif"USEMAP="#map"BORDER="0"ALT="The UNIX CD Bookshelf Navigation"><MAPNAME="map"><AREASHAPE="RECT"COORDS="0,0,73,21"HREF="../index.htm"ALT="The UNIX CD Bookshelf"><AREASHAPE="RECT"COORDS="74,0,163,21"HREF="index.htm"ALT="UNIX Power Tools"><AREASHAPE="RECT"COORDS="164,0,257,21"HREF="../unixnut/index.htm"ALT="UNIX in a Nutshell"><AREASHAPE="RECT"COORDS="258,0,321,21"HREF="../vi/index.htm"ALT="Learning the vi Editor"><AREASHAPE="RECT"COORDS="322,0,378,21"HREF="../sedawk/index.htm"ALT="sed &amp; awk"><AREASHAPE="RECT"COORDS="379,0,438,21"HREF="../ksh/index.htm"ALT="Learning the Korn Shell"><AREASHAPE="RECT"COORDS="439,0,514,21"HREF="../lrnunix/index.htm"ALT="Learning the UNIX Operating System"></MAP></DIV></BODY></HTML>

⌨️ 快捷键说明

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