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

📄 1070-1072.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:
<HTML>

<HEAD>

<TITLE>Linux Complete Command Reference:Special Files:EarthWeb Inc.-</TITLE>

</HEAD>

<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=0672311046 //-->

<!-- TITLE=Linux Complete Command Reference//-->

<!-- AUTHOR=Red Hat//-->

<!-- PUBLISHER=Macmillan Computer Publishing//-->

<!-- IMPRINT=Sams//-->

<!-- CHAPTER=04 //-->

<!-- PAGES=1063-1102 //-->

<!-- UNASSIGNED1 //-->

<!-- UNASSIGNED2 //-->



<P><CENTER>

<a href="1068-1069.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="1073-1074.html">Next</A></CENTER></P>







<A NAME="PAGENUM-1070"><P>Page 1070</P></A>





<TABLE>



<TR><TD>

Character

</TD><TD>

Function

</TD><TD>

Description

</TD></TR><TR><TD>

g

</TD><TD>

TBC

</TD><TD>

Without parameter: clear tab stop at the current position.<BR>

ESC [ 3 g: delete all tab stops.

</TD></TR><TR><TD>

h

</TD><TD>

SM

</TD><TD>

Set mode.

</TD></TR><TR><TD>

l

</TD><TD>

RM

</TD><TD>

Reset mode.

</TD></TR><TR><TD>

m

</TD><TD>

SGR

</TD><TD>

Set attributes.

</TD></TR><TR><TD>

n

</TD><TD>

DSR

</TD><TD>

Status report.

</TD></TR><TR><TD>

q

</TD><TD>

DECLL

</TD><TD>

Set keyboard LEDs.<BR>

ESC [ 0 q: clear all LEDs<BR>

ESC [ 1 q: set Scroll Lock LED<BR>

ESC [ 2 q: set Num Lock LED<BR>

ESC [ 3 q: set Caps Lock LED<BR>

</TD></TR><TR><TD>

r

</TD><TD>

DECSTBM

</TD><TD>

Set scrolling region; parameters are top and bottom row.

</TD></TR><TR><TD>

s

</TD><TD>

?

</TD><TD>

Save cursor location.

</TD></TR><TR><TD>

u

</TD><TD>

?

</TD><TD>

Restore cursor location.

</TD></TR><TR><TD>

`

</TD><TD>

HPA

</TD><TD>

Move cursor to indicated column in current row.

</TD></TR></TABLE>



<P>

<B>ECMA-48 SET GRAPHICS RENDITION</B>

</P>



<P>The ECMA-48 SGR sequence ESC [ &lt;parameters&gt;

m sets display attributes. Several attributes can be set in the

same sequence.</P>



<TABLE>



<TR><TD>

Parameter

</TD><TD>

Result

</TD></TR><TR><TD>

0

</TD><TD>

Reset all attributes to their defaults.

</TD></TR><TR><TD>

1

</TD><TD>

Set bold.

</TD></TR><TR><TD>

2

</TD><TD>

Set half-bright (simulated with color on a color display).

</TD></TR><TR><TD>

4

</TD><TD>

Set underscore (simulated with color on a color display).<BR>

(The colors used to simulate dim or underline are set using

ESC ] ....)<BR>

</TD></TR><TR><TD>

5

</TD><TD>

Set blink.

</TD></TR><TR><TD>

7

</TD><TD>

Set reverse video.

</TD></TR><TR><TD>

10

</TD><TD>

Reset selected mapping, display control flag, and toggle meta flag.

</TD></TR><TR><TD>

11

</TD><TD>

Select null mapping, set display control flag, reset toggle meta flag.

</TD></TR><TR><TD>

12

</TD><TD>

Select null mapping, set display control flag, set toggle meta flag. (The toggle meta

flag causes the high bit of a byte to be toggled before the mapping table translation is done.)

</TD></TR><TR><TD>

21

</TD><TD>

Set normal intensity. (This is not compatible with ECMA-48.)

</TD></TR><TR><TD>

22

</TD><TD>

Set normal intensity.

</TD></TR><TR><TD>

24

</TD><TD>

Underline off.

</TD></TR><TR><TD>

25

</TD><TD>

Blink off.

</TD></TR><TR><TD>

27

</TD><TD>

Reverse video off.

</TD></TR><TR><TD>

30

</TD><TD>

Set black foreground.

</TD></TR><TR><TD>

31

</TD><TD>

Set red foreground.

</TD></TR><TR><TD>

32

</TD><TD>

Set green foreground.

</TD></TR><TR><TD>

33

</TD><TD>

Set brown foreground.

</TD></TR><TR><TD>

34

</TD><TD>

Set blue foreground.

</TD></TR><TR><TD>

35

</TD><TD>

Set magenta foreground.

</TD></TR></TABLE>



<A NAME="PAGENUM-1071"><P>Page 1071</P></A>





<TABLE>



<TR><TD>

Parameter

</TD><TD>

Result

</TD></TR><TR><TD>

36

</TD><TD>

Set cyan foreground.

</TD></TR><TR><TD>

37

</TD><TD>

Set white foreground.

</TD></TR><TR><TD>

38

</TD><TD>

Set underscore on, set default foreground color.

</TD></TR><TR><TD>

39

</TD><TD>

Set underscore off, set default foreground color.

</TD></TR><TR><TD>

40

</TD><TD>

Set black background.

</TD></TR><TR><TD>

41

</TD><TD>

Set red background.

</TD></TR><TR><TD>

42

</TD><TD>

Set green background.

</TD></TR><TR><TD>

43

</TD><TD>

Set brown background.

</TD></TR><TR><TD>

44

</TD><TD>

Set blue background.

</TD></TR><TR><TD>

45

</TD><TD>

Set magenta background.

</TD></TR><TR><TD>

46

</TD><TD>

Set cyan background.

</TD></TR><TR><TD>

47

</TD><TD>

Set white background.

</TD></TR><TR><TD>

49

</TD><TD>

Set default background color.

</TD></TR></TABLE>







<P>

<B>ECMA-48 MODE SWITCHES</B>

</P>



<TABLE>



<TR><TD>

ESC [ 3 h

</TD><TD>

DECCRM (default off): Display control chars.

</TD></TR><TR><TD>

ESC [ 4 h

</TD><TD>

DECIM (default off): Set insert mode.

</TD></TR><TR><TD>

ESC [ 20 h

</TD><TD>

LF/NL (default off): Automatically follow echo of

LF, VT, or FF with CR.

</TD></TR></TABLE>





<P>

<B>ECMA-48 STATUS REPORT COMMANDS</B>

</P>



<TABLE>



<TR><TD>

ESC [ 5 n

</TD><TD>

Device status report (DSR): Answer is

ESC [ 0 n (Terminal OK).

</TD></TR><TR><TD>

ESC [ 6 n

</TD><TD>

Cursor position report (CPR): Answer is

ESC [ y ; x R, where x, y is the cursor location.

</TD></TR></TABLE>





<P>

<B>DEC PRIVATE MODE(DECSET/DECRST) SEQUENCES</B>

</P>

<P>These are not described in ECMA-48. The Set Mode sequences are listed; the Reset Mode sequences are obtained

by replacing the final h by l.</P>



<TABLE>



<TR><TD>

ESC [ ? 1 h

</TD><TD>

DECCKM (default off): When set, the cursor keys send an

ESC O prefix, rather than 

ESC [.

</TD></TR><TR><TD>

ESC [ ? 3 h

</TD><TD>

DECCOLM (default off = 80 columns): 80/132 col mode switch. The driver sources

note that this alone does not suffice; some user-mode utility such as

resizecons(8) has to change the hardware registers on the console video card.

</TD></TR><TR><TD>

ESC [ ? 5 h

</TD><TD>

DECSCNM (default off): Set reverse-video mode.

</TD></TR><TR><TD>

ESC [ ? 6 h

</TD><TD>

DECOM (default off): When set, cursor addressing is relative to the upper left corner

of the scrolling region.

</TD></TR><TR><TD>

ESC [ ? 7 h

</TD><TD>

DECAWM(default on): Set autowrap on. In this mode, a graphics character emitted

after column 80 (or column 132 of DECCOLM is on) forces a wrap to the beginning of

the following line first.

</TD></TR><TR><TD>

ESC [ ? 8 h

</TD><TD>

DECARM (default on): Set keyboard autorepreat on.

</TD></TR><TR><TD>

ESC [ ? 9

</TD><TD>

h X10 Mouse Reporting (default off): Set reporting mode to

1 (or reset to 0). <BR>

(See &quot;Mouse Tracking.&quot;)

</TD></TR><TR><TD>

ESC [ ? 25 h

</TD><TD>

DECCM (default on): Make cursor visible.

</TD></TR><TR><TD>

ESC [ ? 1000 h

</TD><TD>

X11 Mouse Reporting (default off): Set reporting mode to

2 (or reset to 0). <BR>

(See &quot;Mouse Tracking.&quot;)

</TD></TR></TABLE>



<A NAME="PAGENUM-1072"><P>Page 1072</P></A>







<P>

<B>LINUX CONSOLE PRIVATE CSI SEQUENCES</B>

</P>





<P>The following sequences are neither ECMA-48 nor native VT102. They are native to the Linux console driver. Colors are

in SGR parameters: 0 = black, 1 = red, 2 = green,

3 = brown, 4 = blue, 5 = magenta, 6 = cyan, 7 = white.</P>





<TABLE>



<TR><TD>

ESC [ 1 ; n ]

</TD><TD>

Set color n as the underline color

</TD></TR><TR><TD>

ESC [ 2 ; n ]

</TD><TD>

Set color n as the dim color

</TD></TR><TR><TD>

ESC [ 8 ]

</TD><TD>

Make the current color pair the default attributes

</TD></TR><TR><TD>

ESC [ 9 ; n ]

</TD><TD>

Set screen blank time-out to

n minutes

</TD></TR><TR><TD>

ESC [ 10 ; n ]

</TD><TD>

Set bell frequency in Hz

</TD></TR><TR><TD>

ESC [ 11 ; n ]

</TD><TD>

Set bell duration in msec

</TD></TR><TR><TD>

ESC [ 12 ; n ]

</TD><TD>

Bring specified console to the front

</TD></TR><TR><TD>

ESC [ 13 ]

</TD><TD>

Unblank the screen

</TD></TR><TR><TD>

ESC [ 14 ]

</TD><TD>

Set the VESA powerdown interval

</TD></TR></TABLE>







<P>

<B>CHARACTER SETS</B>

</P>



<P>The kernel knows about four translations of bytes into console-screen symbols. The four tables are

</P>





<UL>

<LI>          Latin1 to PC

<LI>          VT100 graphics to PC

<LI>          PC to PC

<LI>          User-defined

</UL>





<P>There are two character sets, called G0 and G1, and one of them is the current character set. (Initially G0.) Typing

^N causes G1 to become current, ^O causes G0 to become current.

</P>

<P>These variables G0 and G1 point to a translation table, and can be changed by the user. Initially, they point at the first

two tables, Latin1 to PC and VT100 graphics to PC, respectively. The sequences

ESC ( B and ESC ( 0 and ESC ( U and ESC ( K cause

G0 to point at the first, second, third, and fourth translation tables in the preceding list, respectively. The

sequences ESC ) B and ESC ) 0 and ESC ) U and ESC )

K cause G1 to point at the first, second, third, and fourth translation tables in

the preceding list, respectively.</P>



<P>The sequence ESC c causes a terminal reset, which is what you want if the screen is all garbled. The oft-advised

&quot;echo ^V^O&quot; will only make G0 current, but there is no guarantee that

G0 points at the first table. In some distributions there is a

program reset(1) that just does echo ^[c. If your

terminfo entry for the console is correct (and has an entry

rs1=c), then tput reset will also work.</P>



<P>The user-defined mapping table can be set using

mapscrn(8). The result of the mapping is that if a symbol

c is printed, the symbol s = map[c] is sent to the video memory. The bitmap that corresponds to

s is found in the character ROM, and can be changed using

setfont(8).</P>





<P>

<B>MOUSE TRACKING</B>

</P>



<P>The mouse tracking facility is intended to return

xterm-compatible mouse status reports. Because the console driver has

no way to know the device or type of the mouse, these reports are returned in the console input stream only when the

virtual terminal driver receives a mouse update ioctl. These ioctls must be generated by a mouse-aware user-mode application

such as the gpm(8) daemon.</P>





<P>Parameters for all mouse tracking escape sequences generated by

xterm encode numeric parameters in a single character

as value+040. For example, ! is 1. The screen coordinate system is 1-based.

</P>

<P>The X10 compatibility mode sends an escape sequence on button press encoding the location and the mouse button

pressed. It is enabled by sending ESC [ ? 9 h and disabled with

ESC [ ? 9 l. On button press, xterm sends ESC [ M

bxy (six characters). Here b is button 1, and x and

y are the x and y coordinates of the mouse when the button was pressed. This is the

same code the kernel also produces.

</P>







<P><CENTER>

<a href="1068-1069.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="1073-1074.html">Next</A></CENTER></P>







</td>
</tr>
</table>

<!-- begin footer information -->







</body></html>

⌨️ 快捷键说明

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