?? rhl14.htm
字號:
<LI>:command executes the command by name. This is used to invoke any of nn's commands, including those that cannot be bound to a key.
<BR>
<BR>
</UL>
<P>The nn man pages provide about 600 lines of very detailed information about all the options and commands available to you. You do not have to use all of them—just use as many as necessary to customize your own environment.
<BR>
<BR>
<A NAME="E69E207"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>tin</B></FONT></CENTER></H4>
<BR>
<P>tin is a screen-oriented Net News reader. It can read news locally (/var/spool/news) or remotely (rtin or tin -r option) via an NNTP (Network News Transport Protocol) server. tin is based on the tass newsreader, which was developed by Rich Skrenta in
March 1991. tass was itself heavily influenced by NOTES, which was developed at the University of Illinois by Ray Essick and Rob Kolstad in 1982. The most relevant author to date is Iain Lea (iain.lea@erlm.siemens.de). Check the long list of contributors
in the man pages.
<BR>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE>Use the h (help) command to view a list of the commands available at any level.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<P>On startup, tin shows a list of the newsgroups found in $HOME/.newsrc. An arrow (->) or highlighted bar points to the first newsgroup. Move to a group by using the terminal arrow keys or j and k. Use Page Up and Page Down or Ctrl-U and Ctrl-D to page
up and down. Select a newsgroup to read from by pressing Enter.
<BR>
<P>The Tab key advances to the next newsgroup that has unread articles and enters it.
<BR>
<P>To start and run tin, export NNTPSERVER to the address of your remote news server. Use the command
<BR>
<BR>
<PRE>
<FONT COLOR="#000080">$ export NNTPSERVER=news.your.provider.com</FONT></PRE>
<P>Then run tin with the -r option to connect to this remote server.
<BR>
<P>A sample tin session is shown in Listing 14.3. It shows two newsgroups that I have subscribed to: alt.humor and tx.jobs.
<BR>
<P>When you select a message to read from and press either the right arrow or Enter key, you are shown the message itself, as shown in Listing 14.4.
<BR>
<P>
<FONT COLOR="#000080"><B>Listing 14.3. A sample </B><B>tin</B><B> session.</B></FONT>
<BR>
<PRE>
<FONT COLOR="#000080"> Group Selection (news.neosoft.com 2) h=help
1 571 alt.humor
u 2 398 tx.jobs
=set current to n, TAB=next unread, /=search pattern, c)atchup,
g)oto, j=line down, k=line up, h)elp, m)ove, q)uit, r=toggle all/unread,
s)ubscribe, S)ub pattern, u)nsubscribe, U)nsub pattern, y)ank in/out
Group tx.jobs ('q' to quit)...</FONT></PRE>
<P>
<FONT COLOR="#000080"><B>Listing 14.4. Another sample </B><B>tin</B><B> session.</B></FONT>
<BR>
<PRE>
<FONT COLOR="#000080"> tx.jobs (368T 401A 0K 0H R) h=help
171 + US-TX-Dallas MicroFocus Cobol Contract Mark Allen
172 + CA-CLARIS HR, WINDOWS DEVELOPMENT POSITIONS A CLARIS HR
173 + CA-CLARIS HR, DIRECTOR OF WORLDWIDE PRODUCT D CLARIS HR
174 + CA-CLARIS HR, INTERNATIONAL WINDOWS ENGINEER CLARIS HR
175 + CA, CLARIS CORP - TELECOMMUNICATIONS ANALYST CLARIS HR
176 + CA- CLARIS HR, SYBASE PROGRAMMER/ANALYST AT C CLARIS HR
177 + CA-CLARIS HR, DOCUMENTATION CONTROL SPECIALIST CLARIS HR
178 + CA-CLARIS, SUPERVISOR, DIRECT ACCOUNT SERVICE CLARIS HR
179 + CA-DEVELOPERS & TEST ENGINEERS - JAPANESE PRO CLARIS HR
180 + CA-CLARIS HR, DATABASE INTERNALS ENGINEER POS CLARIS HR
181 + CA, CLARIS CORPORATION - PRICING ANALYST CLARIS HR
182 + WA-CLARIS HR, MAC & WINDOWS DEV'RS/ INTERFACE CLARIS HR
183 + USA-TX-DALLAS - Informix 4GL/ESQL imi
184 + USA-TX-DALLAS - SONET Telephany Engineers imi
185 + USA-TX-DALLAS - PowerBuilder imi
186 + USA-TX-DALLAS - Oracle DBAs imi
187 + USA-TX-DALLAS - CICS, Cobol, JCL, VSAM (ALC + imi
=set current to n, TAB=next unread, /=search pattern, ^K)ill/select,
a)uthor search, c)atchup, j=line down, k=line up, K=mark read, l)ist thread,
|=pipe, m)ail, o=print, q)uit, r=toggle all/unread, s)ave, t)ag, w=post</FONT></PRE>
<P>In Listing 14.4, you see a list of subject headers and their index numbers. The + sign indicates that you have not read this message. For example, the SONET job for Dallas, Texas, has an index of 184 and is unread. To read this message, use the arrow
keys to move to it, and then press Enter.
<BR>
<BR>
<A NAME="E70E4"></A>
<H5 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Command-Line Options</B></FONT></CENTER></H5>
<BR>
<P>tin has several command-line options, some of which are listed in Table 14.2.
<BR>
<BR>
<P ALIGN=CENTER>
<CENTER>
<FONT COLOR="#000080"><B>Table 14.2. </B><B>tin'</B><B>s command-line options.</B></FONT></CENTER>
<BR>
<TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<I>Option</I>
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<I>Description</I></FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
-c
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Creates or updates index files for every group in $HOME/.newsrc or every file specified by the -f option and marks all articles as read.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
-f file
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Uses the specified file of subscribed newsgroups instead of $HOME/.newsrc.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
-h
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
A help listing of all command-line options.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
-m dir
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
The mailbox directory to use. The default is $HOME/Mail.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
-n
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Loads only groups from the active file that are also subscribed to in the user's .newsrc. This enables a noticeable speedup when connecting via a slow line.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
-p program
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Prints program with options.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
-q quick
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Starts without checking for new newsgroups.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
-r read
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
News specified in the environment variable NNTPSERVER or contained in the file /etc/nntpserver.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
-R read
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
News saved by -S option (not yet implemented remotely from the default NNTP server).</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
-s dir
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Saves articles to a directory. The default is $HOME/News.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
-v
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Verbose mode for the -c, -M, -S, -u, and -Z options.</FONT>
</TABLE><P>To add a new group, type ggroupname. For example, gmisc.invest adds the newsgroup misc.invest.
<BR>
<P>tin offers an emacs-style editing facility for entering messages. The command strings include a history of commands to enable reuse of previous commands. The man pages for tin list all the commands available to you for editing, deleting, and removing
messages.
<BR>
<P>tin uses the following important environment variables:
<BR>
<TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
NNTPSERVER
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
The default NNTP server to remotely read news from. This variable needs to be set only if the -r command-line option is specified and the file /etc/nntpserver does not exist.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
VISUAL
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
This variable overrides the default editor that is used in all editing operations within tin.</FONT>
</TABLE><P>tin can pretty much be navigated by using the four arrow keys. The left arrow key goes up a level; the right arrow key goes down a level; the up arrow key goes up a line or page; and the down arrow key goes down a line or page. Most prompts
within tin can be aborted by pressing Esc.
<BR>
<BR>
<A NAME="E68E104"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>Using FTP</B></FONT></CENTER></H3>
<BR>
<P>File transfer protocol (FTP) is a method of transferring files from one computer to another. FTP provides the capability of transferring files to and from a remote network site as well as means for sharing public files. In this section you go through a
sample FTP session and follow the steps for finding and getting software from a remote site.
<BR>
<P>ftp is the user interface to the ARPANET standard FTP. The ftp service is the interface to the file transfer protocol. It lets a user connect to another site and send and receive files.
<BR>
<P>In this section you will try to get a file from the address tsx-11.mit.edu by logging in as anonymous. This anonymous use of FTP is very convenient and provides access to innumerable servers, providing a wealth of information. Publicly accessible FTP
servers are called anonymous FTP servers.
<BR>
<BR>
<A NAME="E69E208"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Anonymous FTP</B></FONT></CENTER></H4>
<BR>
<P>Anonymous FTP enables users to access remote sites without having an authorized user ID and password. Generally the login ID is anonymous and the password is guest. Most current systems require your e-mail address as the password instead of guest.
<BR>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE>FTP stands for File Transfer Protocol; ftp is the program you run on Linux.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<P>The client host with which ftp is to communicate may be specified on the command line. If this is done, ftp immediately attempts to establish a connection to an FTP server on that host. Otherwise, ftp enters its command interpreter and awaits
instructions from the user. When ftp is awaiting commands from the user, the prompt ftp> is provided to the user. Enter ftp at the prompt, along with the site address:
<BR>
<BR>
<PRE>
<FONT COLOR="#000080">$ ftp hostname</FONT></PRE>
<P>A hostname can be either a hostname or an Internet address. For example, you can use the following Internet address:
<BR>
<BR>
<PRE>
<FONT COLOR="#000080">mpsi$ ftp tsx-11.mit.edu</FONT></PRE>
<P>If your system connects to the MIT server, the text shown in Listing 14.5 appears.
<BR>
<P>
<FONT COLOR="#000080"><B>Listing 14.5. An </B><B>ftp</B><B> session.</B></FONT>
<BR>
<PRE>
<FONT COLOR="#000080">220 tsx-11 FTP server (Version wu-2.4(3) Mon Jun 5 16:40:22 EDT 1995) ready.
Name (tsx-11.mit.edu:uzma): anonymous
331 Guest login ok, send your complete e-mail address as password.
Password:
230-Welcome, archive user! This is an experimental FTP server. If have any
230-unusual problems, please report them via e-mail to ftp-bugs@tsx-11.mit.edu.
230-If you do have problems, please try using a dash (-) as the first character
230-of your password — this will turn off the continuation messages that may
230-be confusing your ftp client.
230-
230-The Linux archives are in /pub/linux/
230-
230-In most places, 'get <directory>.tar' will retrieve a tar file containing
230-that directory. 'get <file>.gz' gets a gzipped version of a files, and
230-'get <file>.Z' gets a compressed version of the file. 'get <dir>.tar.gz'
230-is possible, but not recommended. 'get <dir>.zip' will get a zip archive
230-with *NO* compression of the directory <dir>.
230-
230-If you find something on TSX-11 which doesn't work, or which you
230-believe is obselete, please send mail to ftp-linux@TSX-11.MIT.EDU.
230-INCLUDE THE FULL PATHNAME OF THE FILE AND WHY YOU THINK IT IS OBSOLETE.
230-
230- - Ted and Michael
230-
230 Guest login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp></FONT></PRE>
<P>The first line confirms that the connection is established. Line 220 indicates that the FTP server is ready. The system then prompts for a name, which is anonymous in this case, and a password. The password is not echoed, so any typing mistakes you make
are not apparent. You are then connected to the remote FTP server, which awaits your commands.
<BR>
<BR>
<A NAME="E70E5"></A>
<H5 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>ftp</B><B> Commands</B></FONT></CENTER></H5>
<BR>
<P>The ftp service enables the user to execute several commands. Some of the local commands are listed in Table 14.3.
<BR>
<BR>
<P ALIGN=CENTER>
<CENTER>
<FONT COLOR="#000080"><B>Table 14.3. Some </B><B>ftp</B><B> commands.</B></FONT></CENTER>
<BR>
<TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<I>Command</I>
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -