'Write'에 해당되는 글 1건

  1. 2008.07.21 Chapter 5. Unix Basic Commands _ 사용자와 통신할때 사용하는 명령어
2008. 7. 21. 00:20

Chapter 5. Unix Basic Commands _ 사용자와 통신할때 사용하는 명령어

사용자와 통신(Communication) 할수 있는 명령어

mailx CMD

write CMD

talk CMD


mailx CMD

__________________

interactive message processing system

The mail utilities listed above provide a comfortable, flex-

ible environment for sending and receiving mail messages

electronically.


(
명령어 형식)

# mailx

# mailx -H -u user01

# mailx -s "Test Mail" root@example.com < mailx.txt


[EX]
메일 보내기 / 받기 실습

# mailx user01

Subject : Test Mail <----- "Test Mail" 입력

Hello Test <----- 메일 내용 입력

<Ctrl + D> or <.>

# su - user01

$ mailx

.....

>N 2 Super-User Mon Jan 14 19:32 17/722 Mail for TEST

? 2 <----- '2' 입력

Message 2:

From root@solaris254.example.com Mon Jan 14 19:32:53 2008

Date: Mon, 14 Jan 2008 19:32:53 +0900 (KST)

From: Super-User <root@solaris254.example.com>

To: user01@solaris254.example.com

Subject: Mail for TEST

Hello, user01

? q <----- 'q' 입력

#

# man mailx

.....

-H Print header summary only.

-u user

Read user's mailbox. This is only effective if user's

mailbox is not read protected.

-s subject

Set the Subject header field to subject. subject

should be enclosed in quotes if it contains embedded

white space.

.....


[
주의] mailx 명령어를 통해서 메일을 보내기 위해서는 다음과 같이 호스트의

이름의 설정이 메일 주소를 쓰는 형식과 같이 선언 되어 있어야 한다. 선언이

되어 있지 않다면 "solaris254.example.com" 같은 부분을 선언해 줘야 한다.

# vi /etc/hosts

......


[
수정 전]

172.16.8.254 solaris254 loghost


[
수정 후]

172.16.8.254 solaris254 solaris254.example.com loghost

                                                         ...... A

                                                                |

                                                                +---- 새로 입력



write CMD

__________________


write to another user

The write utility reads lines from the user's standard input

and writes them to the terminal of another user.

user01 -----> user02

user01 <----- user02


(
명령어 형식)

# write user01



talk CMD

__________________

talk to another user

The talk utility is a two-way, screen-oriented communication

program.

user01 <-----> user02 (메신저 기능)

# talk user01@localhost


[
참고] user01 <==> user02 talk

user01 Window) # talk user02@localhost

user02 Window) # talk user01@localhost


[EX] root
사용자가 user01 사용자에게 talk 신청


[TERM1] user01
사용자 윈도우

# telnet localhost

user01 사용자로 로그인


[TERM2] root
사용자 윈도우

# who -----> user01 사용자 로그인 확인

# w -----> user01 사용자 활동량 점검

# talk user01@localhost


[TERM1] user01
사용자 윈도우

# talk root@localhost


출처 : http://cafe.daum.net/bscsolaris