📄 1195-1198.html
字号:
<HTML>
<HEAD>
<TITLE>Linux Complete Command Reference:File Formats: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=05 //-->
<!-- PAGES=1103-1208 //-->
<!-- UNASSIGNED1 //-->
<!-- UNASSIGNED2 //-->
<P><CENTER>
<a href="1190-1194.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="1199-1200.html">Next</A></CENTER></P>
<A NAME="PAGENUM-1195"><P>Page 1195</P></A>
<P>String Capabilities
</P>
<TABLE>
<TR><TD>
RF
</TD><TD>
Request for input from terminal
</TD></TR><TR><TD>
RI
</TD><TD>
Cursor right %1 characters
</TD></TR><TR><TD>
rp
</TD><TD>
Repeat character %1 for %2 times
</TD></TR><TR><TD>
rP
</TD><TD>
Padding after character sent in replace mode
</TD></TR><TR><TD>
rs
</TD><TD>
Reset string
</TD></TR><TR><TD>
RX
</TD><TD>
Turn off XON/XOFF flow control
</TD></TR><TR><TD>
sa
</TD><TD>
Set %1 %2 %3 %4 %5 %6%7 %8 %9 attributes
</TD></TR><TR><TD>
SA
</TD><TD>
Enable automatic margins
</TD></TR><TR><TD>
sc
</TD><TD>
Save cursor position
</TD></TR><TR><TD>
se
</TD><TD>
End standout mode
</TD></TR><TR><TD>
sf
</TD><TD>
Normal scroll one line
</TD></TR><TR><TD>
SF
</TD><TD>
Normal scroll %1 lines
</TD></TR><TR><TD>
so
</TD><TD>
Start standout mode
</TD></TR><TR><TD>
sr
</TD><TD>
Reverse scroll
</TD></TR><TR><TD>
SR
</TD><TD>
Scroll back %1 lines
</TD></TR><TR><TD>
st
</TD><TD>
Set tabulator stop in all rows at current column
</TD></TR><TR><TD>
SX
</TD><TD>
Turn on XON/XOFF flow control
</TD></TR><TR><TD>
ta
</TD><TD>
Move to next hardware tab
</TD></TR><TR><TD>
tc
</TD><TD>
Read in terminal description from another entry
</TD></TR><TR><TD>
te
</TD><TD>
End program that uses cursor motion
</TD></TR><TR><TD>
ti
</TD><TD>
Begin program that uses cursor motion
</TD></TR><TR><TD>
ts
</TD><TD>
Move cursor to column %1 of status line
</TD></TR><TR><TD>
uc
</TD><TD>
Underline character under cursor and move cursor right
</TD></TR><TR><TD>
ue
</TD><TD>
End underlining
</TD></TR><TR><TD>
up
</TD><TD>
Cursor up one line
</TD></TR><TR><TD>
UP
</TD><TD>
Cursor up %1 lines
</TD></TR><TR><TD>
us
</TD><TD>
Start underlining
</TD></TR><TR><TD>
vb
</TD><TD>
Visible bell
</TD></TR><TR><TD>
ve
</TD><TD>
Normal cursor visible
</TD></TR><TR><TD>
vi
</TD><TD>
Cursor invisible
</TD></TR><TR><TD>
vs
</TD><TD>
Standout cursor
</TD></TR><TR><TD>
wi
</TD><TD>
Set window from line %1 to %2 and column %3 to %4
</TD></TR><TR><TD>
XF
</TD><TD>
XOFF character if not ^S
</TD></TR></TABLE>
<P>There are several ways of defining the control codes for string capabilities:
</P>
<P>Normal characters except ^, \, and % represent themselves.
</P>
<P>A ^x means Ctrl+x. Ctrl+A equals 1 decimal. \x means a special code.
x can be one of the following characters:
</P>
<TABLE>
<TR><TD>
E
</TD><TD>
Escape (27).
</TD></TR><TR><TD>
n
</TD><TD>
Linefeed (10).
</TD></TR><TR><TD>
r
</TD><TD>
Carriage return (13).
</TD></TR><TR><TD>
t
</TD><TD>
Tabulation (9).
</TD></TR></TABLE>
<A NAME="PAGENUM-1196"><P>Page 1196</P></A>
<TABLE>
<TR><TD>
b
</TD><TD>
Backspace (8).
</TD></TR><TR><TD>
f
</TD><TD>
Form feed (12).
</TD></TR><TR><TD>
0
</TD><TD>
Null character. A \xxx specifies the octal character
xxx.
</TD></TR><TR><TD>
i
</TD><TD>
Increments parameters by one.
</TD></TR><TR><TD>
r
</TD><TD>
Single parameter capability.
</TD></TR><TR><TD>
+
</TD><TD>
Add value of next character to this parameter and do binary output.
</TD></TR><TR><TD>
2
</TD><TD>
Do ASCII output of this parameter with a field width of 2.
</TD></TR><TR><TD>
d
</TD><TD>
Do ASCII output of this parameter with a field width of 3.
</TD></TR><TR><TD>
%
</TD><TD>
Print a %
</TD></TR></TABLE>
<P>If you use binary output, then you should avoid the null character because it terminates the string. You should reset
tabulator expansion if a tabulator can be the binary output of a parameter.
</P>
<P>Warning: The preceding metacharacters for parameters may be wrong; they document Minix
termcap, which may not be compatible with Linux
termcap.
</P>
<P>The block graphic characters can be specified by three string capabilities:
</P>
<TABLE>
<TR><TD>
as
</TD><TD>
Start the alternative charset.
</TD></TR><TR><TD>
ae
</TD><TD>
End it.
</TD></TR><TR><TD>
ac
</TD><TD>
Pairs of characters. The first character is the name of the block graphic symbol
and the second character is its definition.
</TD></TR></TABLE>
<P>The following names are available:
</P>
<TABLE>
<TR><TD>
+
</TD><TD>
Right arrow (>)
</TD></TR><TR><TD>
,
</TD><TD>
Left arrow (<)
</TD></TR><TR><TD>
.
</TD><TD>
Down arrow (v)
</TD></TR><TR><TD>
0
</TD><TD>
Full square (#)
</TD></TR><TR><TD>
I
</TD><TD>
Latern (#)
</TD></TR><TR><TD>
-
</TD><TD>
Upper arrow (^)
</TD></TR><TR><TD>
`
</TD><TD>
Rhombus (+)
</TD></TR><TR><TD>
a
</TD><TD>
Chess board (:)
</TD></TR><TR><TD>
f
</TD><TD>
Degree (`)
</TD></TR><TR><TD>
g
</TD><TD>
Plus-minus (#)
</TD></TR><TR><TD>
h
</TD><TD>
Square (#)
</TD></TR><TR><TD>
j
</TD><TD>
Right bottom corner (+)
</TD></TR><TR><TD>
k
</TD><TD>
Right upper corner (+)
</TD></TR><TR><TD>
l
</TD><TD>
Left upper corner (+)
</TD></TR><TR><TD>
m
</TD><TD>
Left bottom corner (+)
</TD></TR><TR><TD>
n
</TD><TD>
Cross (+)
</TD></TR><TR><TD>
o
</TD><TD>
Upper horizontal line (-)
</TD></TR><TR><TD>
q
</TD><TD>
Middle horizontal line (-)
</TD></TR><TR><TD>
s
</TD><TD>
Bottom horizontal line (_)
</TD></TR><TR><TD>
t
</TD><TD>
Left tee (+)
</TD></TR><TR><TD>
u
</TD><TD>
Right tee (+)
</TD></TR><TR><TD>
v
</TD><TD>
Bottom tee (+)
</TD></TR><TR><TD>
w
</TD><TD>
Normal tee (+)
</TD></TR><TR><TD>
x
</TD><TD>
Vertical line (_)
</TD></TR><TR><TD>
~
</TD><TD>
Paragraph (???)
</TD></TR></TABLE>
<A NAME="PAGENUM-1197"><P>Page 1197</P></A>
<P>The values in parentheses are suggested defaults that are used by
curses if the capabilities are missing.
</P>
<P><B>
SEE ALSO
</B></P>
<P>
termcap(3), curses(3), terminfo(5)
</P>
<P>Linux
</P>
<H3><A NAME="ch05_ 57">
ttytype
</A></H3>
<P>ttytype—Terminal name and device list.
</P>
<P><B>
DESCRIPTION
</B></P>
<P>The /etc/ttytype file associates
termcap/terminfo terminal type names with tty lines. Each line consists of a terminal
type, followed by whitespace, followed by a tty name (a device name without the
/dev/ prefix).
</P>
<P>This association is used by the program tset(1) to set the environment variable
TERM to the default terminal name for the user's current
tty.
</P>
<P>This facility was designed for a traditional time-sharing environment featuring character-cell terminals hardwired to a
UNIX minicomputer. It is little used on modern workstation and personal UNIXes.
</P>
<P><B>
EXAMPLE
</B></P>
<P>A typical /etc/ttytype is
</P>
<!-- CODE SNIP //-->
<PRE>
con80x25 tty1
vt320 ttys0
</PRE>
<!-- END CODE SNIP //-->
<P><B>
FILES
</B></P>
<TABLE>
<TR><TD>
/etc/ttytype
</TD><TD>
The tty definitions file
</TD></TR></TABLE>
<P><B>
SEE ALSO
</B></P>
<P>getty(1), terminfo(5), termcap(5)
</P>
<P>Linux, 24 July 1993
</P>
<H3><A NAME="ch05_ 58">
tzfile
</A></H3>
<P>tzfile—Time zone information.
</P>
<P><B>
SYNOPSIS
</B></P>
<!-- CODE SNIP //-->
<PRE>
#include <tzfile.h>
</PRE>
<!-- END CODE SNIP //-->
<P><B>
DESCRIPTION
</B></P>
<P>The time zone information files used by tzset(3) begin with bytes reserved for future use, followed by six four-byte values
of type long, written in a "standard" byte order (the high-order byte of the value is written first). These values are, in order
</P>
<TABLE>
<TR><TD>
tzh_ttisgmtcnt
</TD><TD>
The number of GMT/local indicators stored in the file.
</TD></TR><TR><TD>
tzh_ttisstdcnt
</TD><TD>
The number of standard/wall indicators stored in the file.
</TD></TR><TR><TD>
tzh_leapcnt
</TD><TD>
The number of leap seconds for which data is stored in the file.
</TD></TR><TR><TD>
tzh_timecnt
</TD><TD>
The number of "transition times" for which data is stored in the file.
</TD></TR><TR><TD>
tzh_typecnt
</TD><TD>
The number of "local time types" for which data is stored in the file (must not be zero).
</TD></TR><TR><TD>
tzh_charcnt
</TD><TD>
The number of characters of "time zone abbreviation strings" stored in the file.
</TD></TR></TABLE>
<A NAME="PAGENUM-1198"><P>Page 1198</P></A>
<P>The preceding header is followed by tzh_timecnt four-byte values of type
long, sorted in ascending order. These values are written in "standard" byte order. Each is used as a transition time (as returned by
time(2)) at which the rules for computing local time change. Next come
tzh_timecnt one-byte values of type unsigned char; each one tells which of the different
types of "local time" types described in the file is associated with the same-indexed transition time. These values serve as
indices into an array of ttinfo structures that appears next in the file; these structures are defined as follows:
</P>
<!-- CODE SNIP //-->
<PRE>
struct ttinfo {
long tt_gmtoff;
int tt_isdst;
unsigned int tt_abbrind;
};
</PRE>
<!-- END CODE SNIP //-->
<P>Each structure is written as a four-byte value for
tt_gmtoff of type long, in a standard byte order, followed by a
one-byte value for tt_isdst and a one-byte value for
tt_abbrind. In each structure, tt_gmtoff gives the number of seconds to be
added to GMT, tt_isdst tells whether tm_isdst should be set by
localtime(3) and tt_abbrind serves as an index into the array
of time zone abbreviation characters that follow the
ttinfo structures in the file.
</P>
<P>Then there are tzh_leapcnt pairs of four-byte values, written in standard byte order; the first value of each pair gives the
time (as returned by time(2)) at which a leap second occurs; the second gives the total number of leap seconds to be applied
after the given time. The pairs of values are sorted in ascending order by time.
</P>
<P>Then there are tzh_ttisstdcnt standard/wall indicators, each stored as a one-byte value; they tell whether the transition
times associated with local time types were specified as standard time or wall clock time and are used when a time zone file is
used in handling POSIX-style time zone environment variables.
</P>
<P>Finally, there are tzh_ttisgmtcnt GMT/local indicators, each stored as a one-byte value; they tell whether the transition
times associated with local time types were specified as GMT or local time and are used when a time zone file is used in
handling POSIX-style time zone environment variables.
</P>
<P>Localtime uses the first standard-time ttinfo structure in the file (or simply the first
ttinfo structure in the absence of a standard-time structure) if either
tzh_timecnt is zero or the time argument is less than the first transition time recorded in
the file.
</P>
<P><B>
SEE ALSO
</B></P>
<P>
newctime(3)
</P>
<H3><A NAME="ch05_ 59">
utmp, wtmp
</A></H3>
<P>utmp, wtmp—Login records.
</P>
<P><B>
SYNOPSIS
</B></P>
<!-- CODE SNIP //-->
<PRE>
#include <utmp.h>
</PRE>
<!-- END CODE SNIP //-->
<P><B>
DESCRIPTION
</B></P>
<P>The utmp file allows you to discover information about who is currently using the system. There may be more users
currently using the system because not all programs use
utmp logging.
</P>
<P>Warning: utmp must not be writable because many system programs depend on its integrity. You risk faked system log
files and modifications of system files if you leave
utmp writable to any user.
</P>
<P>The file is a sequence of entries with the following structure declared in the include file:
</P>
<!-- CODE SNIP //-->
<PRE>
#define UT_UNKNOWN 0
#define RUN_LVL 1
#define BOOT_TIME 2
#define NEW_TIME 3
#define OLD_TIME 4
</PRE>
<!-- END CODE SNIP //-->
<P><CENTER>
<a href="1190-1194.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="1199-1200.html">Next</A></CENTER></P>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -