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

📄 ch14.htm

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTM
📖 第 1 页 / 共 5 页
字号:


<P>You can answer Calvin by initiating another <TT>write</TT> session from your end



and typing your message. You have to press Enter at the end of each line for it to



be displayed at the other terminal. To simplify communications, you can type <TT>over</TT>



at the logical end of your sentence. Calvin should do likewise.



<H4 ALIGN="CENTER"><A NAME="Heading8<FONT COLOR="#000077">write Etiquette</FONT></H4>



<P>If you are waiting for the other party to respond to your <TT>write</TT> request,



it is polite to let him reply while you wait. Only after he has accepted your invitation



should the conversation begin. Also, let the called party have the first chance to



reply by typing <TT>hello</TT> or any other salutation. Avoid typing until the other



party stops or signals you to begin with an end-of-message word, such as <TT>over</TT>.



Remember, only one person can speak at a time on this channel.



<H3 ALIGN="CENTER"><A NAME="Heading9<FONT COLOR="#000077">The talk Communication



Tool</FONT></H3>



<P>The <TT>write</TT> tool was nice for communicating one at a time. However, UNIX



enables you to type simultaneously with the <TT>talk</TT> tool.</P>



<P><TT>talk</TT> is an interactive communication tool that enables you to have an



actual conversation in real-time mode with another user. You can actually see the



conversation being typed as the other user is typing it. For <TT>talk</TT> to work,



the other user has to be logged in, just as in <TT>write</TT>.</P>



<P><TT>talk</TT> can be very annoying and disturbing if someone wants to be pesky.



If you don't want to be disturbed, just turn <TT>talk</TT> off by entering <TT>mesg



n</TT> at the prompt.



<H4 ALIGN="CENTER"><A NAME="Heading10<FONT COLOR="#000077">A Sample talk Session</FONT></H4>



<P>You can talk to somebody by typing <TT>talk</TT> followed by the user's login



ID. To see if the user is logged in, you can use the <TT>who</TT> command just like



you did for <TT>write</TT>. Let's try to talk to Calvin:<FONT COLOR="#0066FF"></FONT>



<PRE><FONT COLOR="#0066FF">$  talk calvin



</FONT></PRE>



<P>The computer responds with<FONT COLOR="#0066FF"></FONT>



<PRE><FONT COLOR="#0066FF">[Waiting for your party to respond]



</FONT></PRE>



<P>The user on the other end sees the following message even if he is in the middle



of an edit session. The system beeps and displays the following message on the terminal:<FONT



COLOR="#0066FF"></FONT>



<PRE><FONT COLOR="#0066FF">Message from Talk_Daemon@mpsi at 13:08 ...



talk: connection requested by laurel@hobbes.com.



talk: respond with:  talk laurel@hobbes.com



</FONT></PRE>



<P>To respond to this phone call, type the command shown in the <TT>respond with</TT>



message shown here. If your friend does not respond, the <TT>talk</TT> daemon persistently



bothers him with the preceding message every 30 seconds.</P>



<P>At your terminal, you see the following messages:<FONT COLOR="#0066FF"></FONT>



<PRE><FONT COLOR="#0066FF">[Ringing your party again]



[Ringing your party again]



[Ringing your party again]



[Ringing your party again]



</FONT></PRE>



<P>Occasionally, you will see the following message:<FONT COLOR="#0066FF"></FONT>



<PRE><FONT COLOR="#0066FF">[Your party is refusing messages]



</FONT></PRE>



<P>What happened? Your friend at the other end does not want to talk or be disturbed.



After several of your interruptions, he has decided to turn his <TT>mesg</TT> off.



That is why you got the message that your party is refusing messages.</P>



<P>Now let's look at a nicer scenario, when someone wants to talk to you. He has



to respond with the following command:<FONT COLOR="#0066FF"></FONT>



<PRE><FONT COLOR="#0066FF">talk laurel



</FONT></PRE>



<P>Then your terminal displays the following screen:</P>



<P>[Connection Established]</P>



<P>---------------------------------------</P>



<P>The screen is divided horizontally with a dotted line, and you can type your message



on the top half of the screen. This appears verbatim on the other terminal at the



bottom half of the screen. You can type your messages, and the other user can type



his, simultaneously.</P>



<P>The connection can be closed by entering Ctrl-C. The following line appears on



the screen:<FONT COLOR="#0066FF"></FONT>



<PRE><FONT COLOR="#0066FF">[Connection closing.Exiting]



</FONT></PRE>



<P>You should now be back at your shell's command prompt.



<H4 ALIGN="CENTER"><A NAME="Heading11<FONT COLOR="#000077">talk Etiquette</FONT></H4>



<P>The same etiquette applies to <TT>talk</TT> as in <TT>write</TT>. Always use lowercase



letters, because CAPS LOCK conversations are considered loud and rude. Always finish



your sentence by typing <TT>over</TT>. If you initiated the talk session, wait for



the other party to respond with the <TT>hello</TT> first. To prevent both of you



from typing at the same time, always read your message, wait for the <TT>over</TT>,



type your own message, and then terminate it with <TT>over</TT>.



<H3 ALIGN="CENTER"><A NAME="Heading12<FONT COLOR="#000077">Electronic Mail</FONT></H3>



<P>Electronic mail has taken the world by storm. E-mail, short for electronic mail,



is a method of sending a message from a user on one computer to one or several recipients



on another computer. E-mail provides fast and efficient transportation of data and



documents. This mode of communication also eliminates the need to play telephone



tag or to wait for a convenient or appropriate time to call someone. For someone



with Internet access, e-mail provides the means to communicate with friends around



the world.



<H4 ALIGN="CENTER"><A NAME="Heading13<FONT COLOR="#000077">Mailboxes and Agents</FONT></H4>



<P>E-mail is stored in a file called the system mail in the mailbox. System mail



has the same name as that of the user. For example, a user named Calvin will have



a mailbox under Linux in <TT>/var/spool/mail/calvin</TT>.</P>



<P>E-mail originates in the form of a file on your computer created by a Mail User



Agent (MUA). E-mail is then submitted to a mail router such as sendmail, after which



it is handed over to a Mail Transporter Agent (MTA). E-mail is then appended to a



mailbox. The MTA delivers it to the final delivery agent by traversing one or more



hosts.</P>



<P>The MUA is used to read and send mail. The MUA is the user interface for the mail



system. Mail can be composed by using simple MUAs such as mail or mailx, or sophisticated



mail user agents such as <TT>elm</TT> or pine.



<H4 ALIGN="CENTER"><A NAME="Heading14<FONT COLOR="#000077">Understanding the



Mail Message</FONT></H4>



<P>A mail message includes two parts: a mail header and the text body.</P>



<P>The mail header is generated by the mail program automatically. A typical header



in a mail message looks like this:<FONT COLOR="#0066FF"></FONT>



<PRE><FONT COLOR="#0066FF">Date: Fri, 6 Jan 1995 13:27:00 -0600



From: &quot;Calvin N. Hobbes&quot; &lt;calvin@hobbes.com&gt;



To: laurel@hady.com



Subject: Format for a mail header



Hi, just checking the different parts in a mail message



</FONT></PRE>



<P><TT>Date</TT> specifies the date and time the message is sent.</P>



<P><TT>From</TT> specifies both the sender's name in quotes and the address, which



includes the login ID and the address of their machine, <TT>hobbes.com</TT>.</P>



<P><TT>To</TT> is the recipient's mail address.</P>



<P><TT>Subject</TT> is a one-line description of the mail message.</P>



<P>The mail header is followed by the body of the mail message. Here you type the



message as text. The mail message is terminated by typing a period (<TT>.</TT>) as



the first character on the last line. The mail handler responds with <TT>EOT</TT>,



for End Of Text. This is the standard procedure for Berkeley Mail; other mail handlers



have their own way of ending message text entry.



<H4 ALIGN="CENTER"><A NAME="Heading15<FONT COLOR="#000077">Types of Mail User



Agents</FONT></H4>



<P>There are several types of mail user agents, some of which are listed here. A



variety of different programs can be used for reading the mail. The two most common



programs are <TT>mail</TT> and <TT>Mail</TT> (also called <TT>mailx</TT>). Because



of the similarity of their names, <TT>Mail</TT> is also called <TT>capmail</TT> or



Berkeley Mail. Berkeley Mail is far superior to <TT>mail</TT> because it is much



easier to use.</P>



<P>This section covers the following types of mail user agents:







<UL>



	<LI><TT>elm</TT>



	<P>



	<LI>Pine



	<P>



	<LI><TT>mailx</TT> (Berkeley Mail)



</UL>







<P>Using elm <TT>elm</TT>, which stands for electronic mail, provides a full-screen



interface mail program with a good help feature. <TT>elm</TT> is a pleasure to use



when compared with Berkeley Mail because of its simplicity of use and functionality.</P>



<P>Start the <TT>elm</TT> system by typing <TT>elm</TT> at the command prompt:<FONT



COLOR="#0066FF"></FONT>



<PRE><FONT COLOR="#0066FF">$ elm



</FONT></PRE>



<P>The screen is cleared, and the code shown in Listing 14.1 is displayed.



<H3 ALIGN="CENTER"><A NAME="Heading16<FONT COLOR="#000077">Listing 14.1. elms



main screen.</FONT><FONT COLOR="#0066FF"></FONT></H3>



<PRE><FONT COLOR="#0066FF">$ elm



  Mailbox is `/var/spool/mail/calvin' with 5 messages [ELM 2.4 PL25]







  N  1   Jan 12 Laurel N. Hardy     (15)   using el



  N  2   Jan 12 Laurel N. Hardy     (15)   2nd elm message



  N  3   Jan 12 Laurel N. Hardy     (16)   Using elm



  N  4   Jan 11 Laurel N. Hardy     (11)   Re: Format for a mail header



  N  5   Jan 11 Laurel N. Hardy     (11)   message # 1



    You can use any of the following commands by pressing the first character;



</FONT></PRE>



<P>d)elete or u)ndelete mail, m)ail a message, r)eply or f)orward mail, q)uit</P>



<P>To read a message, press &lt;return&gt;. j = move down, k = move up, ? = help<FONT



COLOR="#0066FF"></FONT>



<PRE><FONT COLOR="#0066FF">Command:



</FONT></PRE>



<P>The top line on the screen is the mailbox and the number of messages it has in



it. You may also see <TT>elm</TT>'s version number. This is followed by a list of



all the messages in the mailbox, the date the messages were sent, the sender's name,



and the subject of the message.</P>



<P>The current message is indicated by an arrow or inverse video.</P>



<P>One nice feature of <TT>elm</TT> is that it displays the sender's name instead



of the login ID, as Berkeley Mail does.</P>



<P>The bottom part of the screen lists the options available. At this point, you



can reply to the message, delete or undelete a message, or forward the mail by entering



the appropriate command. You can go up and down the message list by using k and j,



just as in the <TT>vi</TT> editor.</P>







<P>Some of the actions available in <TT>elm</TT> are listed in Table 14.1. <BR>



<FONT SIZE="4"></FONT>



<CENTER>



<P><FONT SIZE="4"><B>Table 14.1. elm actions. </B></FONT>



<TABLE BORDER="0">



	<TR ALIGN="LEFT" rowspan="1">



		<TD ALIGN="LEFT"><I>Command </I></TD>



		<TD ALIGN="LEFT"><I>elm 2.4 Action </I></TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD ALIGN="LEFT">Enter, Spacebar </TD>



		<TD ALIGN="LEFT">Displays current message. </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD ALIGN="LEFT">| </TD>



		<TD ALIGN="LEFT">Pipes current message or tagged messages to a system command. </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD ALIGN="LEFT">! </TD>



		<TD ALIGN="LEFT">Shell escape. </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD ALIGN="LEFT">? </TD>



		<TD ALIGN="LEFT">This screen of information. </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD ALIGN="LEFT">= </TD>



		<TD ALIGN="LEFT">Sets current message to first message. </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD ALIGN="LEFT">* </TD>



		<TD ALIGN="LEFT">Sets current message to last message. </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD ALIGN="LEFT">&lt;NUMBER&gt;, Enter </TD>



		<TD ALIGN="LEFT">Sets current message to &lt;NUMBER&gt;. </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD ALIGN="LEFT">/ </TD>



		<TD ALIGN="LEFT">Searches From/Subjects for pattern. </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD ALIGN="LEFT">// </TD>



		<TD ALIGN="LEFT">Searches entire message texts for pattern. </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD ALIGN="LEFT">&gt; </TD>



		<TD ALIGN="LEFT">Saves current message or tagged messages to a folder. </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD ALIGN="LEFT">&lt; </TD>



		<TD ALIGN="LEFT">Scans current message for calendar entries. </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD ALIGN="LEFT">C </TD>



		<TD ALIGN="LEFT">Copies current message or tagged messages. </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD ALIGN="LEFT">c </TD>



		<TD ALIGN="LEFT">Changes to another folder. </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD ALIGN="LEFT">d </TD>



		<TD ALIGN="LEFT">Deletes current message. </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD ALIGN="LEFT">Ctrl-D </TD>



		<TD ALIGN="LEFT">Deletes messages with a specified pattern. </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD ALIGN="LEFT">e </TD>



		<TD ALIGN="LEFT">Edits current folder. </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD ALIGN="LEFT">f </TD>



		<TD ALIGN="LEFT">Forwards current message. </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD ALIGN="LEFT">g </TD>



		<TD ALIGN="LEFT">Groups (all recipients') reply to current message. </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD ALIGN="LEFT">h </TD>



		<TD ALIGN="LEFT">Headers displayed with message. </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD ALIGN="LEFT">J </TD>



		<TD ALIGN="LEFT">Increments current message by one. </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD ALIGN="LEFT">j, &lt;DOWN&gt; </TD>



		<TD ALIGN="LEFT">Advances to next undeleted message. </TD>



	</TR>



	<TR ALIGN="LEFT" rowspan="1">



		<TD ALIGN="LEFT">K </TD>



		<TD ALIGN="LEFT">Decrements current message by one. </TD>



	</TR>

⌨️ 快捷键说明

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