:


		        UNIX
                         

			 UNIX SystemV

                        Operating  System

		        UNIX
		      ( UNIX  Tutorial )


     ,    ,    -
         
   The Santa Cruz Operation,  Inc,   
Microsoft Corporation.  ,   
,     ,    -
  .      -
         
.     -
   ,    -   
,     .


     Portions 1980,  1981, 1982, 1983, 1984, 1985, 1986, 1987,
     1988  Microsoft Corporation.
     All rights reserved.
     Portions 1983,  1984,  1985,  1986,  1987, 1988 The Santa
     Cruz Operation, Inc.
     All rights reserved.



      ,       -
              
:  (b) (3) (ii)    
   ,    (b)  (2)
      ;  ,    .
52.227-7013.


     Microsoft, MS-DOS      XENIX      
Microsoft Corporation.
     UNIX    AT&T Bell Laboratories.

     SCO  : XG-5-16-88-5.0
.
                          .
     ________________________________________________________

     1.   

     1.1      1-1
     1.2        1-1
     1.3       1-2

     2.    

     2.1      2-1
     2.2      2-1
     2.3      2-2
     2.4       2-6
     2.5      2-10
     2.6        2-13

     3.     

     3.1      3-1
     3.2         3-1
     3.3         3-5
     3.4         3-6
     3.5       3-7

     4.       

     4.1      4-1
     4.2        4-1
     4.3         vi  4-7
     4.4       4-10
     4.5        4-13
     4.6        4-20
     4.7            4-23

     5.    

     5.1      5-1
     5.2        5-1
     5.3       5-9
     5.4          5-10
     5.5       5-12
     5.6       Shell  5-17
.
     6       UNIX

     6.1      6-1
     6.2          6-1
     6.3       6-2
     6.4        6-7
     6.5        6-8
.
                               1.

                               
     _______________________________________________________

     1.1      1-1
     1.2        1-1
     1.3       1-2
.
                              1-1

     1.1    

             
UNIX.     ,    
  UNIX  XENIX.
      UNIX        .   
   ,     -
. ,       -
      .
          ,    
         UNIX.   ,
  ,      
   UNIX.       , -
  UNIX User's Reference   UNIX User's Guide.

     1.1      

         :

     .   1, "",      ,
          .
     .   2,  "  ",     ,
               -
	 UNIX. ,     ,  
          .
     .   3,  "   ", ,    -
        ,        ,     
	 ,       UNIX.
     .   4, "        ", ,
               ,     
            .      ,   -
              ,    ,  ,
                .  
           ,       
	   UNIX,    
            .
.
                              1-2

     .    5,  " ", ,  -
	   UNIX.  ,  -
            ,     ,  
                
              .     
	      UNIX.
     .    6,  "      
	UNIX",      "-
	  " UNIX:      -
          ,        
          .

          ,   
    2.  ,   , -
    .      -
   3  6,      -
    ,   .
           
.      
,   .  ,  , 
  ,  ,  ,   
 ,    ,   ,  
 .      4.4   4.
 ,   4.4,      4.1
- 4.3.

     1.3    

             -
 :

     .  ,   , .
     .  ,      ,   
        .
     .  ,   ,   -
        . ,  Return  
             RETURN.
.
                              1-3

     .          
         . :
             Ctrl-d.
            ,     
        ,      ,  ,     ,
          .         
        Control  d.
     .           
          , :
             touch(C)
	               UNIX
        User's  Reference,        
        .
.


                             2.

                       .
     ___________________________________________________________

     2.1      2-1
     2.2      2-1
            2.2.1       2-1
            2.2.2        2-2
     2.3      2-2
            2.3.1       2-2
            2.3.2        2-3
            2.3.3      2-3
            2.3.4       2-4
     2.4       2-6
            2.4.1       2-6
            2.4.2      2-6
            2.4.3       2-7
            2.4.4       2-8
     2.5      2-10
            2.5.1       2-11
            2.5.2      2-12
     2.6        2-13
            2.6.1      2-13
            2.6.2      2-14
.
                              2-1

     2.1    

          ,   -
       UNIX.   -
     ,    -
,            
  ,       -
 .          
   .

     2.2    .

     2.2.1     

       ()      
 ,      UNIX.  -
    :

     .    .    ,    
            .      
           .
     .   .      -
                  .
               .
     .    .   -
               
        .     -    
         .      -
              ,    -
           .
     .   " ".  -    -
        ,       .  
                  
         .
     .   " ".   -
	            UNIX.    
               
         Bourne Shell,     -
           ($).  ,    
           C-Shell     
        (%)  ,   Visual Shell,   -
         -.     
	 " UNIX",  " UNIX",
               .
.
                              2-2

           ,   
  ,       
UNIX.

     2.2.2      

        ,   
UNIX   " ".  (-
    "").  -
     -
             .
      -
  .    
    ,   .

     2.3    

      -       UNIX.   
UNIX     :    (,   
  ,    ""),   
 .       ,  -
.

     2.3.1     

                -
.   - ,   ,   -
,    ,    -
.     ,     -
,             .  
       -
   ,       
.
          :

     .   ,   ;
     .      ,  -
         ;
     .    ;
     .     ;
     .    ;
     .   ()   .
.
                              2-3

      

          -
 ""  ,    -
      ,     
 .    ,   -
 " ". UNIX    :

                  ,  -
                           
                    cat   more.  ,   
                       ,   
                      .

              ,     -
                    ,    .

             ,   -
                    ,      -
                    ,    .  
                        ,   
                        .

         .   (
   ).     -
  ,   .    
,       ,   
/  . ,   -
      ,      
 .
     ,   ,   UNIX -
 .       
  ,          .
           ,  
 -   ,     .

     2.3.2      .

         ,   
 -,  ,    -
,         "
".          -
.       . -
    UNIX Administrator's Guide.

     2.3.3       .

       - , , ,  . 
,      (,    ).
     "".
.
                              2-4

           .  -
       ,
  UNIX    . 
      ,  -
   :   ,     , 
   ,   ,   -
  ,          
.
         ,        
   .      
,      .   - -
   ,     -
 " "   .  
      ,   -
  ""  "".    -
  ,      ""  "-
".        .
    ,     -
.

     2.3.4     .

           -
       -
   .    UNIX -
   "       "    ,
       .
         -
.    ,    -
 ,   "".   ,
     ,     -
,   ..  cd      -
  .      
,   "" (root)  ,  "" -
  .    "" ,    
 -   "".    2-1  
  :

                         / root
           _________________|___________________
          |                 |                   |
         bin               usr                 dev
          |       __________|__________         |
          |      |                     |        |
        chmod  gwenl                markt     ttyla
               __|______        _______|__
              |         |      |          |
            mail      news   text       data

         . 2-1    
.
                              2-5

       2-1  bin,  usr, dev, gwenl  markt 
 ,        .
     ,  
  (/).   mail,  news,  text   data  
 ,     - "" .  chmod -
  ,    . -
 ttyla  -    .   
      .
             ,  
   ,       
""   .  . 2-1  mail  news
   gwenl, ,   , 
  usr.   usr    .
           ,      
  -    .   
 .    - .     
   UNIX  .

      .

         UNIX  , 
"", .   ,     
,        .    -
 ,      , 
         -
.       UNIX
     usr,   -
 2-2.

                        usr
           ______________|______________
          |              |              |
        adam            eve            mary
          |      ________|________      |
          |     |                 |     |
        text  text              temp   text

     . 2-2.     

       2-2 ,   usr  
  .      -
: adam, eve  mary.
.
                              2-6

     2.4     .

      ,      UNIX   
     .    -   
.

     2.4.1     .

       - ,    1  14 -
,     ,    
, ,  ,   (_).  -
 ,        .   
      ,     -
 -     .  
,    ,    
  .
        -   .   -
, ,     ,  
  ,    file1.  ,      
      ,    
   .     
     .  ,   
    text,      -
. (. . 2-2).
          ,       
"",            lc.
    (System configuration  files)
 .    lc -a     -
.   (-)      ,   
    . ,    -
      (?),     (*),
 ([  ])   ,      -
   UNIX.  (     -
        " ",   
 ).

     2.4.2    .

      -    ,  -
        ,  
       -  -
.      ,    -
         .
  ,      -
   ,         
      ( ).    pwd,
    .
.
                              2-7

     ,     ,  
  .   -   -
      .   -
:     ,   ,
     .  ,  
   ,   ,    -
    .

    2.4.3     .

       UNIX      
:

     /                   .
     /bin              ,    -
		           UNIX.
     /usr              ,     -
                       .     /usr/bin -
                           
		        UNIX,     /bin.
     /dev              ,     
                       .
     /dev/console          - -
                        .
     /dev/ttyXX               -
                        . XX  
                       , ,  la  006. -
                         - .
     /lib              ,  "" -
                       ,     -
                       .
     /usr/lib          ,   UNIX.
     /tmp              ,   .
     /usr/joe/run           . 
                          run,   -
                          joe.
.
                              2-8

     bin/skript          .      
                       skript   bin   -
                       .     
                        (/),             
                       /bin/skript.         
                       /usr/joe,                     
                       /usr/joe/bin/skript.
     file1                  .

        ,    ,  "-
" .       "
"        . -
    UNIX    
     :

     .         .  ,
         ./filexxx   filexxx ,     
          .
     ..    ,   -
           .  ,    ../..  -
           ,       ""
         .

     2.4.4     .

     UNIX       
  . ,  ,   -
   .      -
       ,  ,  ,  chpt1,
chpt2, chpt3   .  .       
    ,   ,   ,  
chpt1.1, chpt1.2, chpt1.3  ..
             -
 ,     :

          lp chpt1.1 chpt1.2 chpt1.3 ...
.
                              2-9

                 ,     
, ,   ,  .  , 
     .   -
,       -  "",   
  ,    -
  ,      
 .         -
:

     *         .
     []     -   .
     ?      -  .

     ,   :

            lp chpt*

        "     
",    ,  ,  :
"    ,       
chpt,     ".      -
      .
             lp.
        .  ,
            


            lc chpt*

       *      -
 .          
 .    ,      
 ,       :

            cat *

               .
 -      ,  
 . ,     
  1  4  9.   :

            lp chpt[12349]*
.
                              2-10

      ([  ])    "    
".         
,       ,  
 :

            lp chpt[1-49]*

     (,        -
  chpt1  chpt4  chpt9,     -
  chpt1  chpt49).    ,   
      :  "[a-z]",   
"     z".
       (?)  -  :

            lc ?

              ,   
   .     
      (.. chpt1.1, chpt2.1, ...).

            lc chpt*.1

           -
 *,  ?,  [],       .  ,
         '?',   
    :

            lc '?'

          ""    UNIX
User's Guide.

     2.5    

               UNIX,
lc, lp   cat.  lc     -
,   lp   ,  cat -  -
  .
        .    
 ,  UNIX       , 
 ,  .     
     ,     -
.             
.
.
                              2-11

     2.5.1     .

      UNIX   ,   "-
 ",      .   -
,     . ( 
 UNIX:   Bourne Shell,  C-Shell  Visual Shell).  UNIX
      ,     
,         ,   
.     ,    UNIX
     .    
,     , 
"  ".      -
         RETURN.
      
BKSP  Ctrl-u.     INTERRUPT  RETURN, -
 ,    ,  . (-
    DEL   INTERRUPT).
               -
,        . , -
          -
 :

            date; pwd

        " ",     -
        (&).   
   ""   .  -
         -
       -
. ,      
   /usr,       ,
    :

            du /usr > diskuse &

      du      diskuse,  
   ,     
" > ". (       " 
" .      "  -
 ").
.
                              2-12

     2.5.2    .

        :

            cmd [] [] [ ] [...]

      ,     -
.
         .   -
     (-).     
 . ,  lc   -
       .   -
   -l (lc -l)      -
 .
                
 ,    :

            lc -rl

             ,   
 -rl     
       .
              -
, :

            copy -a -v   

       -   copy    
            
   .    -v  
"",      -
.
     ,         -
:

            grep ' ' data.file

          -  ,  
 ,    grep     data.file.
.
                              2-13

     2.6      .

          UNIX  ,   
   ,      
 .      :

            cat

            .  -
,          ,     
 ,       Ctrl-d,     "
"  "  ".
     , :

                RETURN
              RETURN
            Ctrl-d

      cat        -
.  ,      
 .       :
     _________________________________________________________
     |
     |   $ cat
     |     
     |     
     |   
     |   
     |   $

              "",
,      ,     ,  
      ,    . ,
   "",     -
    . (    -
    ).

     2.6.1    

      UNIX      ,   
.        -
 :

            lc
.
                              2-14

         ,    
     ,     filelist (  ,
   ):

            lc > filelist

     ,      -  "-
" ( > ),- :  "    ,  -
    ,    . -
   -    :

            cat f1 f2 f3 > temp

                temp
    cat   .
        ,      ( >> ),  
   ,    - "-
   file1,  file2  file3    temp,  
       ":

            cat file1 file2 file3 >> temp

          ,    temp  
,      .
     ,     (  <  )   :
"      ,   -
   " < ",     ".    -
     letter.txt   UNIX 
  mail:

            mail adam eve mary < letter.txt

     (  mail   6  ).

     2.6.2    .

           UNIX  
 .   -    
     .     -
,   ,  "".
.
                              2-15

     , ,        
  frank.txt,  george.txt  hank.txt   -
.      :

            sort frank.txt george.txt hank.txt > temp1
            uniq < temp1 > temp2
            more temp2
            rm temp1 temp2

          ,  ,   .
   sort    uniq,     uniq
   more.      -
 :

            sort frank.txt george.txt hank.txt | uniq | more

       (|)     uniq  
sort,   ,    sort,   
 ,          
uniq, ,   ,     
    more.
        -     .   wc
  ,        -
.   who    -
 ,      .  ,
         
    ,   
  who:

            who | wc -l

            wc -l  wc. -
 wc   ,        
,   wc -l     .
      ,        
,        . -
,   ,        
 ,       .  
    ,  .
.

                               3

                       .
     _________________________________________________________

     3.1      3-1
     3.2         3-1
            3.2.1        3-1
            3.2.2        3-3
            3.2.3       3-3
     3.3         3-5
            3.3.1       3-5
            3.3.2     -      3-5
            3.3.3      
                       3-6
     3.4         3-6
     3.5       3-7
            3.5.1        3-7
            3.5.2        3-8
            3.5.3         3-8
.
                              3-1

     3.1    

       ,   ,     -
  UNIX:

     .    
     .    
     .   
     .     
     .     
     .    UNIX
     .    ,  
     .       

             
,  ,   .
     ,    ,       .
            UNIX  User's
Reference.

     3.2       .

         UNIX      -
  .  ,      -
 . ,      -
  .

     3.2.1      .

         ,      
 (  ).    
     .  ,  
  -     , -
  UNIX Sistem Administrator's Guide,    -
   .       
      .
.
                              3-2

     ,     ,   -
  - "login:".    -
   - ,     
 INTERRUPT ( DEL).
      ,  ,   "login:"    
,     :

     1.          RETURN.
                    , 
         Ctrl-u          
         ( Ctrl,  ,   ,   u).
          ,    RETURN,   
          "Password:".

     2.       RETURN.   
                   
         .   ,        
            ,   ,  
          .       
          ,      -
          :

         _____________________________________________________
         |
         |   Login incorrect
         |   login:
         |

           ,     .

     3.     ,     
         ,            
         .        -
         :

         _____________________________________________________
         |
         |   TERM=(unknown)
         |

            ,    
           . (    , -
            .)
.
                              3-3

         ,     
" ".   Bourne Shell    ($),
   C-Shell    (%).    
,     UNIX   .
        ,     -
   .

     3.2.2      .

           -    
  logout ( %  C-Shell)   exit (
$  Bourne Shell).      -
  Ctrl-d.  ,      
   Ctrl-d.   -  -
    UNIX  Ctrl-d,     -
           .  
    Ctrl-d  ,    
    .    -
          
Ctrl-d.
     ,      Ctrl-d 
   .  ,     -
 exit  logout.       , 
       Ctrl-d, exit  logout.

     3.2.3     .

             
     
.        ,  
    .   UNIX
   .     
, ,     - 
 (  ,    )   -
 .
           passwd.  
  :

     1.       RETURN:

            passwd
.
                              3-4

          :
         _____________________________________________________
         |
         |  Changing password for user
         |  Old password:
         |

                  
          user.

     2.      .   
         .    ,  RETURN. -
           "Sorry",    .
              1.

     3.    ,    
            RETURN:

         _____________________________________________________
         |
         |   New password:
         |

               RETURN.   
               
         .

     4.     :

         _____________________________________________________
         |
         |   Re-enter new password:
         |

            .     ,   
          :
         _____________________________________________________
         |
         |   They don't match; try again
         |
.
                              3-5

         ,   -
 UNIX.       ,  -
,     .

     3.3       .

      ,    -   -
.        
 -     .

     3.3.1     .

           :

     1.    ,    .  -
               , -
          ,     .   (:
         frAiJ6*)
     2.       ( ),  -
               ,  
            /usr/dict/words. (  
          terry9)
     3.       .   -
          ,          
          .

     3.3.2     -    .

        -     -
.     .

     1.   ,     ,    
         .
     2.   ,    , 
          lock(C).
     3.   "  "   -
          .  (  4      
         ,   )
     4.   -      -
             ,      -
         .
.
                              3-6

     5.     - ,   -
              ,          
         -   ,  
          .

     3.3.3       .

             -
. ,       ,  
         -
 .      ,    su
      ,   
   .    su
    .
     ,          joe,
    UNIX  (      
login)  :

            su joe

         ,   
joe.     su     
 ,   Ctrl-d.

     3.4       .

           -
      UNIX.       
         -
 UNIX.         ,
 ,    .
                
.        
   .profile    .
    C-Shell,     .profile, 
  ,   .login,    .
           ,    -
      :

     .       ,   
               .   
            ,    -
            .profile (.login),  
        .
.
                              3-7

     .      ,        -
               "unknown"  ()   
        "ansi" (),      -
        .          
           .        
                    
        RETURN        .   -
            .

         ,  
 vi   .profile (.login).  4 
 ,    vi.
       vi,     ,  
:

            eval 'tset -m :\?unknown -s -r -Q'

      unknown (  ,   )     
     . , -
      vt100,     -
  :

            eval 'tset -m :|?vt100 -s -r -Q'

      ,    ,    
:

            TERM = (vt100)

      RETURN,         vt100.
   vt100.

     3.5     .

             ,   
   ,      
      UNIX.  -
 ,      -
  /   .   -
 .

     3.5.1      .

              -
      RETURN.       RETURN,
        -
 .    RETURN   ,   
   .
.
                              3-8

               ,  
,       -
   .     -
 UNIX  .     UNIX  
   256  .    -
  ,      
,   ,    -
. (   RETURN   .    
  RETURN    .)

            lc -la
            du -a
            lc -Fa

            
,       , , -
,   ,    .

     3.5.2      .

      ,          
.            -
   Ctrl-u.     Ctrl-u,   
 ,     .

     3.5.3       .

            
,      .   
 Ctrl-s.             
Ctrl-q.      Ctrl-s  Ctrl-q,
   ,   Ctrl-s  
  Ctrl-q   :

            ls /bin
.

                                4.

                    .
     ___________________________________________________________

     4.1      4-1
     4.2        4-1
            4.2.1          4-2
            4.2.2        4-2
            4.2.3         4-3
            4.2.4       4-4
            4.2.5       4-5
            4.2.6       4-6
            4.2.7       4-6
     4.3         vi  4-7
            4.3.1       4-7
            4.3.2       4-8
            4.3.3       4-8
            4.3.4       4-9
            4.3.5       vi  4-9
     4.4       4-10
            4.4.1     lp  4-10
            4.4.2      lp  4-11
            4.4.3         4-12
            4.4.4          4-12
     4.5        4-13
            4.5.1          4-14
            4.5.2       4-16
            4.5.3       4-16
            4.5.4       4-17
            4.5.5       4-18
            4.5.6       4-18
            4.5.7       4-19
.

     4.6        4-20
            4.6.1       4-20
            4.6.2       4-21
            4.6.3         4-21
            4.6.4     ,     4-22
     4.7            4-23
            4.7.1          4-26
            4.7.1          4-28
.

     4.1    .

            ,     
  UNIX:

     .     ,
     .    ,
     .     ,
     .  , ,    -
        ,
     .        vi,
     .   ,
     .      ,
     .  , , , ,
           ,
     .     ,
     .     ,
     .   ,     ,
     .        .

         .    
  ,      .
               .   
             UNIX  User's
Reference.

     4.2      .

         ,   
 UNIX     .  UNIX -
    ,       .
     .
.
                                4-2

     4.2.1        .

     ,     ,   - 
   .      
  .      
  pwd,        "print  working
directory" ("  "). ,   -
 , ,   :

            pwd

         ,     
.

     4.2.2      .

             
 :

            lc     -   ls.   ls
                      
                  .  lc  -
                       -
                       .
            lf       lc,      -
                    (/)   
                 ( )  (*).

                  
/usr/bin:

            lc /usr/bin

          ,    
    UNIX.   lc   -
     .
.
                                4-3

        l.     ls -l,
   ""    .
   :

    __________________________________________________________
   |
   |   total 338
   |   -rw-rw-r--  1 markt pub  4448 Mar   1 09:16 1.intro.00
   |   -rw-rw-r--  1 markt pub  4457 Mar   1 09:29 1.intro.s
   |   -rw-rw-r--  1 markt pub 33836 Mar   1 09:30 2.consepts.00
   |   -rw-rw-r--  1 markt pub 35096 Mar   1 12:49 2.consepts.s
   |   -rw-rw-r--  1 markt pub 52197 Mar   1 15:09 3.basic.s
   |   -rw-rw-r--  1 markt pub 39835 Feb  16 11:02 4.advan.s
   |

       l,    ,    
     :

     .   
     .    
     .  
     .  
     .    
     .    
     .   

            "",  -
       .   -
 512 . 338 ,  173056 ,  
   .

     4.2.3       .

        -      ,  
 .         UNIX
   cd.
.
                                4-4

        cd  ,      -
 .  .  cd.   ,
        ,    
  pwd.
        ,      -
,        cd.
,   ,    /usr/bin:

            cd /usr/bin

     ,    /usr/bin,  pwd.
           :

            cd /

       - ""  .  ( ,
    .)     -
 "" .     lf   -
,     .      -
 .  (      
 2  .)
            
   .   ,    -
     , :

            cd ..

        -      :

            cd ../..

         ,    -
 ,  ,  ,    -
.   (pwd).

     4.2.4     .

         ,    -
    mkdir.   cd     -
          
   tempdir:

            mkdir tempdir
.
                                4-5

         lf,  tempdir . -
  tempdir    cd  ,   tempdir
 ( lf). ,   touch(C)  -
  tempdir   :

            touch tempfile1 tempfile2

       lf  ,   tempfile1    tempfile2
.
           ,      
    ,       -
.          -
 mkdir,    :

            mkdir: cannot acctss directory_name

          directory_name    
 ,       .  -
     /etc,      -
    :

            mkdir /etc/temp

     4.2.5     

          rmdir.  -
    ,     .
 :       -
 cd         -
  4.2.4  tempdir:

            rmdir tempdir

         :

            rmdir: tempdir not empty

        tempdir   rmdir,  
     tempfile1  tempfile2,   
.       ,     -
  .
.
                                4-6

     4.2.6     .

         o mv.  -
,          cd    
     tempdir - ,
  4.2.4, -  newdir:

            mv tempdir newdir

     ,   ,    lf. ,
         newdir  ,
 ,    .    
lf:

            lf newdir

     4.2.7     .

      copy  . ,   -
     ,     
     .
        /newdir,   4.2.6,  
    tmp/newdir,   :

            copy $HOME/newdir /tmp/newdir

          "$HOME" -    
  .
      ,       $HOME/newdir  
/tmp/newdir,   :

            lf /tmp/newdir

      /tmp/newdir,   :

            rm /tmp/newdir/*
            rmdir /tmp/newdir
.
                                4-7

             /tmp/newdir,  
        /tmp/newdir.    ,    
/tmp/newdir ,   :

            lf /tmp

      $HOME/newdir,   :

            rm $HOME/newdir/*
            rmdir $HOME/newdir

     4.3         vi.

       vi   ,   -
   UNIX.       -
 vi.      
 UNIX User's Guide.

     4.3.1     .

              cd,  
      tempfile:

            vi tempfile

      ,    ,   -
 .      vi.
         vi:       .
       ,   
 -    .    tempfile
,  i     .
        ,   RETURN  -
 .        , 
 BKSP      :

              ,   .
	          UNIX.
              ,    .

      ,      ,  -
 ESC.           -
 .
.
                                4-8

     4.3.2     .

           , -
     ( ,    
 ):

     h       ,   h  
             .
     l        .
     k        .
     j        .

           
     .  ,    -
  h,l,k,j    .

     4.3.3     .

         vi  .    -
    ,    .
              -
    x.  ,     ,
     .
        ,        
   dw ( d,  ,  ,  w). -
     ,    ""  
  .
       ,       
   dd ( d,   ,  ,    d).
           
.       :
      _________________________________________________________
     |
     |       .
     |         UNIX.
     |
.
                                4-9

     4.3.4     .

     a i   o    .    -
  i      .    
     ,    
 ,        ,   i
    ,       
,    ESC.  ,     "" 
 ""       ,     i,   
"",          ESC
.     :
      __________________________________________________________
     |
     |          UNIX.
     |

      o       .
        ,   
   ,    o.   
  ,        .  
    .  ,  -
    tempfile   o.      
.  ESC,  .

     4.3.5       vi.

      -      ,  -
,   vi.   ,    
  :x.     ,   -
,      UNIX.
              
  .       :q!.
         UNIX    
 ,    .
        tempfile,   :x.     tempfile,
  :

            vi tempfile
.
                               4-10

      -    i  o,   ESC 
 :q!            .
 tempfile    :

            cat tempfile

      ,      . -
 tempfile   

            rm tempfile

     4.4     .

             lp.    
   " ".     
      .   -
          -
,            
.       -
        .

     4.4.1     lp.

          cd       
     ,      
:

            cp /etc/motd $HOME/printfile

          /etc/motd    -
   printfile.   /etc/motd - "message  of  the
day file"  -  "  ".    
         .
             -
,      -   .   
,          
    .    -
,   :

            chmod o+x $HOME

     ( "      -
"    ,     chmod(C).)
.
                               4-11

          printfile:

            lp printfile

              printfile
   .  ,      -
 ,        lp.
         lp,       
" ID",    :

            pr4-532

         (pr4)  -  , 
  .    (532)   -
 .         -
    ,    ID. (
       .)
         lp  .  , -
        
 /etc/passwd,     :

            sort /etc/passwd | lp

     (  sort(C)   " ",   
 .)

     4.4.2      lp.

      lp   ,    -
   .      , -
     ,     
-n. ,     printfile, :

            lp printfile -n2

         UNIX      
.    -d    ,
     .   ,  -
     printfile  ,  -
 laser, :

            lp printfile -n2 -dlaser

              
 .
.
                               4-12

     4.4.3       .

       cancel     . -
 cancel    ID-.  ,  -
    ID-  laser-245 ,  -
 :

            cancel laser-245

          lp     
    cancel.  ,    
  printfile:

            rm printfile

         cancel   
. ,         
 -    laser,     
:

            cancel laser

          ,    -
     .

     4.4.4        .

       lpstat     
 .     :

            lpstat

      lpstat    :
      _________________________________________________________
     |
     |   prt1-121    cindum    450   Dec 15 09:30
     |   laser-450   cindum   4968   Dec 15 09:46
     |
.
                               4-13

     , ,    lpstat  ,  -
     .    -
       -
,    lpstat   -o.    
 ,    .
           lpstat  
ID-   ,    .   
     .    
  ,   ,   -
  -       .
           
lpstat  ID- . ,   
  ID- laser-256   :

            lpstat laser-256

          .
             -
,   -p,      -
  .       -
    :

            lpstat -p

         laser, :

            lpstat -plaser

      ID-      -
,        laser.

     4.5      .

        ( , ,   -
, ,  ,    )
       . -
 UNIX,   ,  .
.
                               4-14

     4.5.1        .

      more     ,   ,
 ,      ,  -
 .        
 .       ,
         -
:

            --More--(XX%)

     XX% ,       
.  ,     -
 RETURN.     .
       :

            more /etc/rc

            /etc/rc.   -
   ,    ,  q.
      more    ,      .
,  ,   more,   
,       (/). , -
          ,   
"process"  /etc/rc :

            more /etc/rc

           :
      ________________________________________________________
     |
     |   ...skipping
     |

        ,       
   .       -
 "Pattern not found" ("  ").
             more  -
,     ,    vi  -
 ,   v. ,     -
           
    .       
     .
.
                               4-15

          more  .  ,
 more ,      -
    .      
   /bin   :

            l /bin | more

     (    2  .)
      head  tail     
  .    ,     10 
     .     
  10    /etc/rc:

            tail /etc/rc

               
 .          20
 /etc/rc:

            head -20 /etc/rc

        20   /etc/rc:

            tail -20 /etc/rc

      cat      . 
 more,  cat      ,   
    Ctrl-s.  Ctrl-d   -
.    ,   
 .       
INTERRUPT (Del).
              
/etc/termcap.  Ctrl-s  Ctrl-d    -
   INTERRUPT    :

            cat /etc/tempcat
.
                               4-16

     4.5.2     .

      rm    .   -
        rm. 
       cd    -
      :

            touch tempfile1 tempfile2 tempfile3

       tempfile3 :

            rm tempfile3

      -i       -
,          ,
       ,     
 .     y   RETURN,  
 .    n,   .  -
 ,       ,  -
   .        
,       .
           :

            rm -i tempfile1 tempfile2

     ,        -
 .      UNIX.  
   .  ,   -
  ,        -
    :

            rm -i tempfile*

     (     UNIX -
   2  .)

     4.5.3     .

        ,  cat   -
         -
 .      cat  
.         ( > ).  
    ,       .
(       ,    2 
.)
.
                               4-17

                cd 
      /etc/motd  
/etc/rc    catfile:

            cat /etc/motd /etc/rc > catfile

          catfile  
 more:

            more catfile

      >>        
     .  ,   
/etc/motd  catfile,   :

            cat /etc/motd >> catfile

           catfile  /etc/motd. -
     :

            head -20 catfile
            tail -20 catfile

     4.5.4     .

      mv  UNIX   :  -
       .     
   cd.     catfile, 
 4.5.3,  catfile2,   :

            mv catfile catfile2

         catfile   -
.   catfile2     .  
:

            lc
.
                               4-18

     4.5.5     .

             -
 mv       .   
      . , -
    catfile2,    4.5.4,  -
 /tmp:

            mv $HOME/catfile2 /tmp

       ,    catfile2   /tmp 
    , :

            lc . /tmp

     (,     UNIX   -
   ,    (.)   
.)
     ,          catfile2 
  :

            mv /tmp/catfile2

      mv  ,     -
  .   ,   ,  -
  ,    . , -
           ,  
     .

     4.5.6     .

      cp    .     -
   :  -     -
,   -      .
             cd. -
            
catfile2,   4.5.4,   catfile3:

            cp catfile2 catfile3

            .  
  catfile2  catfile3   /tmp, :

            cp catfile2 catfile3 /tmp
.
                               4-19

            -
 :

             cp catfile* /tmp

        mv,   cp  ,    
   .    ,   ,
     ,   -
   .  ,     mv, cp -
    .     
   catfile2  catfile3,      
 ,    -  /tmp.

     4.5.7     .

       UNIX    . -
    .     find  
      .  -
  :

            find pathname -name filename -print

     pathname -   ,      -
.  :      -
   ,    .
      -name ,      , 
 - filename.   -print    
      ,      
.
               
,    catfile2,   4.5.4:

            find / -name catfile2 -print

        ,   ,   -
.     ,   catfile2 
    :     /tmp      
 .   catfile2  catfile3  /tmp  
    :

            rm /tmp/catfile* $HOME/catfile*
.
                               4-20

     4.6      .

     UNIX  ,    
.      -
  ,  ,    -
,   ,      .   
    .

     4.6.1     .

      diff      
   ,      .  
    ,     vi 
      .    
men  women.     cd    -
.    UNIX   :

            vi men

     ,   ,     - 
i -    :

                
                .

         (Esc)     men, 
:w.    ,   women:

            :n women

        :

            "women" No such file or directory

          women.   i  
      :

                
                .

      Esc     ,    :x
     vi.       :  men 
women.
           
:

            diff men women
.
                               4-21

       diff    :
      _________________________________________________________
     |
     |   lcl
     |   <     
     |   ---
     |   >     
     |

        - ,     men  women.

     4.6.2     .

            
 sort.     sort     
   ,      
.        
  ,     ,  .  -
      .
                
     ,   -
 :

            sort /etc/passwd

      sort    .    
            -
    :

            who | sort

     4.6.3       .

      grep     ,  
  ,       .
                 
/etc/passwd,    . -
,       :

            grep  login /etc/passwd
.
                               4-22

         login     .
      :
 _______________________________________________________________
|
| markt:0V/WE/utnUkpc:6005:104:Mark Taub, Docland:/u/markt:/bin/csh
|
     ,  ,       grep  
  ,       
 (').  ,     
  .       "joe",   
 "Joe".
      : ,      - -
  phonelist,      -
 .            
.      grep   -
  -    Joe,    -
   822:

            grep 'Joe' phonelist | grep '822-' > joes.number

       grep    phonelist   ,
    "Joe".       
  grep,        ,
        "822-". ,  
( ,  )     joes.number.
        UNIX   .    -
  egrep   fgrep.      
grep   UNIX User's Reference.

     4.6.4     ,   .

      wc     .   -
         ,   
, ,        
.  ,  wc    .
.
                               4-23

                cd. 
     ,    
 men,   4.6.1:

            wc men

         :
      __________________________________________________________
     |
     |   2   10  55 men
     |

        :  -    
men,  -     -  .  -
  men    women    :

            rm *men

        ,        -
     -c, -w  -l . -
,           
    :

            who | wc -l

      who      -
,    .  wc -l  -
 .     .

     4.7          .

      UNIX     
     .    -
 UNIX     .    
      ,   
.       
    cd,   ,   
       .
             -
    l.       
 cd    l,      -
       .
.
                              4-24

      10 ,    l,  -
 .          
   :

     -     .

     b        -    . 
          ,  -       
          .

     c             
          .

     d    .

     m       .

     n      .

     p     .

     s    .

      9           ,
    :

     .     ,

     .      

     .       .

              -
,    ,  -
     .      
         -
.
.
                              4-25

           :

     r      .
     w      .
     x      .
     -      .

          :

     r         ; 
                "x" .
     w           . -
              "x" .
     x       .        "x"
          ,        
          cd,         -
           . ,     "x" -
          ,     -   .

        ,  
 :

     d---------        .   
                    ,   -
                   .
     drwx------         . -
                          
                      (    
                   ),      cd,
                        .  
                      .
     drwxr-x---        , -
                     ,      
                         -
                      ,        
                     cd.  ,    
                          .
                        , 
                       .
.
                              4-26

     drwxr-x--x         , -
                    ,       
                        
                     cd. ,      -
                    "r" ,  
                         
                      lc.    
                   ,        ,
                          - 
                   -  ,   
                        -
                   .

      /etc       .
       :

            l /etc | more

     4.7.1        .

      chmod    , , -
      .   :

            chmod instruction filename

      instruction ,       
    .    -
    .    -
 :

     u     -     .
     g    ,  ,   .
     o    , ..  ,     u  g.
     a      .

        :

     r    ,    ,    
            .
.
                              4-27

     w    ,        
            .

     x     -      .

            cd.  -
      tempfile:

            touch tempfile

     ,    tempfile  :

            -rw-r--r--

           :

            l tempfile

          (..    )
      tempfile:

            chmod u+x tempfile

         l ,     .
(,   tempfile     -
,       ).
              -
 tempfile      :

            chmod go+w tempfile

         l,    .
           ,     
     chmod. ,   -
,             
 tempfile:

            chmod o-w temfile

      tempfile    rm:

            rm tempfile
.
                              4-28


     4.7.2        .

              
,           .
            
  . ,    -
    ,         -
 cd,          -
.
              ,
 , :

            drwxr-xr-x

       ,   :

            l -d $HOME

     , ,   :
      ___________________________________________________________
     |
     |   drwxr-xr-x  4 markt pub   240 Feb 10 09:09 /u/markt
     |

           , 
 ,       cd, 
      (,  ,    
   ),       
   .        
         
   cd,      
   ,    .
             -
   ,   :

            chmod o-x $HOME

     ,     .    
 :

            l -d $HOME
.
                              4-29

         :
      __________________________________________________________
     |
     |   drwxr-xr--  4 markt pub   240 Feb 10 09:09 /u/markt
     |

               -
   .        -
          -
,   :

            chmod o+d $HOME

.



                              5.

                       
    ____________________________________________________________

     5.1      5-1

     5.2        5-1
            5.2.1       
            5.2.2       tar   -
                      
            5.2.3      
            5.2.4       
            5.2.5       tar

     5.3       5-9

     5.4           5-10
            5.4.1        ?
            5.4.2       

     5.5       5-12
            5.5.1        -
                     
            5.5.2      
            5.5.3       ?
            5.5.4     

     5.6       Shell  5-17
.
                             5-1

     5.1    .

             
UNIX.      -
, ,     ,  -
        UNIX.
        :

     .         ,
     .       ,
     .     -,
     .     / -
          ,
     .       ,
     .       ,
     .      shell   
          .

         .   
  -     ,   
    .
        .   -
   UNIX User' Reference.

     5.2      .

          -  
. ,      
         -
  .       tar.
         -    -
 . ,     - 
   ,    .  
 ,        -
  tar   .
.
                              5-2

     5.2.1       .

         5.25    360  (double-
sides, double-density)   -,  -
 :

            format

      ,       RETURN.
         5.25    1.2  -
 (double-sides, high-density),   :

            format /dev/rfd096ds15

         3.5   720K ( -
), :

            format /dev/rfd096ds9

          ,  -
 0  rfd  1.
                .
,   ,      --
,  .   :

            format /dev/rctmini

     5.2.2      tar  
                         .

          tar.  :

            tar [key] [files]

      key        tar.  
files   ,    .
.
                              5-3

          key:

     c    .
     x       .
     t      .
     v       .
     f      .

      .

            
    .    
   tar.
             -
 cd     .      
      files    -
,   : dev/rctmini  /dev/rct0.

     1.    .        -
         - .
     2.  ,    ,  -
          ,     format,    
         5.2.1.      -
           :

            du -a
.
                              5-4


         :
      __________________________________________________________
     |
     |   12    ./1.intro.s
     |   74    ./2.concepts.s
     |   14    ./2.concepts.err
     |   0     ./.err
     |   60    ./5.house.s
     |   32    ./3.log.s
     |   2     ./err
     |   2     ./0.title
     |   30    ./6.desk.s
     |   112   ./4.files.s
     |   12    ./4.files.err
     |   4     ./3.log.err
     |   356   .
     |

        -   512-  , -
   .     
356512  ,   183.     -
   -.

     3.             360-
             (5.25 ),   
         -,    :

            tar cvf /dev/fd048ds9 .

           5.25     -
           1.2 , :

            tar cvf /dev/fd096ds15 .

             tar    -
           ,         
           "volume".     
         .   tar  , -
             .

            1.2  ,
:

            tar cvf /dev/fd096ds15 ./filename

     ,     (filename)    
 (./).      tar    filename
  "",     . ( -
      tar . tar(C).)
.
                                5-5

       tar       
 . ,   /bin    -
  ,  tar       
.

     5.2.3      .

          5.25  360, -
   ,    tar  ,
:

            tar tvf /dev/fd048ds9 .

     ,   1.2 , :

            tar tvf /dev/fd096ds15 .

       3.5  :

            tar tvf /dev/fd096ds9 .

           tar,    
          ,
  5.2.2.        
 .

     5.2.4       .

         ,   ""
  ,        .  
         mv   
      .   -
   ,       -
     ,   tar  
      .
             5.25 -
 360,    , :

            tar xvf /dev/fd048ds9
.
                                5-6

          1.2 :

            tar xvf /dev/fd096ds15

                1.2 ,
:

            tar xvf /dev/fd096ds15 ./filename

     ,  filename         
(./),    tar  filename    -
 (.),     5.2.2.      -
   tar   -  ,   
  "./".       
    ,   ,    
./filename,  filename      .
           (5.2.2)  
     tar.     -
 :

     1.     /tmp  

            cd /tmp

     2.    /tmp :

            mkdir  login

          login    .
     3.  :

            cd login

     4.        Bourne shell,   
              1.2 , 
           .profile    :

            tar xvf /dev/fd096ds15 ./.profile
.
                                5-7


            C shell, :

            tar xvf /dev/fd096ds15 ./.login

              1.2 ,  -
              .

     5.    ,      
          , :

            lc -a

          -a   lc    -
         , ..    (.).

     6.        tar    
          1.2 ,    :

            tar xvf /dev/fd096ds15

              1.2 ,  -
              .


     5.2.5       tar.

     UNIX       tar.
          
 .  /etc/default/tar   -
     -  .  -
       /etc/default/tar:

            more /etc/default/tar
.
                                5-8

        :
      _________________________________________________________
     |
     |  #    device                 block   size   tape
     |  archive0=/dev/rfd048ds9     18      360    n
     |  archive1=/dev/rfd148ds9     18      360    n
     |  archive2=/dev/rfd096ds15    10      1200   n
     |  archive3=/dev/rfd196ds15    10      1200   n
     |  archive4=/dev/rfd096ds9     18      720    n
     |  archive5=/dev/rfd196ds9     18      720    n
     |  archive6=/dev/rfd0135ds18   18      1440   n
     |  archive7=/dev/rfd1135ds18   18      1440   n
     |  archive8=/dev/rct0          20      0      y
     |  archive9=/dev/rtcmini       20      0      y
     |  #   The default device...
     |  archive=/dev/rfd096ds15     10      1200   n
     |

       rfd  0    360,  1  -
   360, 2 -   1.2 , 3 - -
  1.2  ,  ..
              
360 (5.25 ),  , :

            tar cv .

     (  ,      0. 
   .)
              
5.25  1.2    , :

            tar cv2 .

           3.5  720 ( -
), :

            tar xv4 ./filename

     ,   /etc/default/tar     
   .    -
        .   -
  ,    ,  
      .
.
                                5-9

     5.3     .

         ,    
-,     diskcp(C)  -
    .      -
   UNIX.
            
.     UNIX,     
.         ,
    UNIX,   
   UNIX.       ,    ,
       ,  
       -
.
      diskcp     -
  .      diskcp   
 :

     1.        -, -
               .   ,   
         5.2.2,         -
          ,    
            .
     2.       .  --
         . ,  ,      
          ,  .
               ,  
           .       
          ,    -  -.
     3.        360  -
             :

            diskcp -f

            1.2  :

            diskcp -f -96
.
                               5-10


                ,
             360, :

            diskcp

           1.2 , :

            diskcp -96

              ,  -
              360  -
          :

            disk -d

     4.         
         . ,         
         ,           
          -.
     5.          
         ,       
              ,   -
          ,   :

            tar tvf /dev/fd096ds15

           360, :

            tar tvf /dev/fd048ds9

         ,       
           tar,      .

     5.4         .

       UNIX   , -
   ,         -
   , ,       
        -
.      ,   .
.
                               5-11


     5.4.1        ?

       who     ,    
  ,       
.   :

            who

          :
      ________________________________________________________
     |
     |  arnold  tty1a  Apr7  10:02
     |  daphne  tty1b  Apr7  07:47
     |  elliot  tty1c  Apr7  14:21
     |  ellen   tty2a  Apr7  08:36
     |  gus     tty2b  Apr7  09:55
     |  adrian  tty2c  Apr7  14:21
     |

           - ,    , 
   finger.       
.      finger.

     5.4.2       .

       df      -
.   ,      
        -
.  -  512 .     -
    :

            df

         :
      _________________________________________________________
     |
     |  /   (/dev/root):   5956 blocks  1437 inodes
     |

      ,     /dev/root 5956 
 1437    . 5956  -
  3 .
.
                               5-12


         -v,  df   -
          .
  :

            df -v

        :
      _________________________________________________________
     |
     |  Mount Dir   Filesystem  blocks  used   free  % used
     |  /           /dev/root    80152  70192   9960    88%
     |  /y          /dev/y       82194  34314  47880    42%
     |  /u          /dev/u       50000  37840  12160    76%
     |

     ,         /dev/root 88%,  70192
    80152, ;   9960
.


     5.5     .

         .  -
 UNIX         ,
       ,    -
 .    -   ,    
     .     
  .  ,      vi,
 ,    ,  -
-.
            , 
  .        -
   ,        .
         
.

     5.5.1        .

      ,   ,   -
 .         
,     .  ,   
     ,   
   ,    -
    .
.
                              5-13


              -
 (&)    . ,  -
            .
,       .    
        
,     .     
   shell  ,    -
   :

         cat /etc/tempcar /etc/tempcar /etc/tempcar > lagefile; \
         wc -c lagefile > characters &

       wc    characters.   
 ,         
,          
 .        -
 .         - 
   .
        characters      cat.
 ,  characters  largefile   -
 rm.
          ,    -
                 
INTERRUPT,        .   
           
kill.    ,   5.5.4.

     5.5.2       .

                 ,
UNIX    .    
  at.   at    
   .
       at   .   -
:

            at time day < file

      file     ,   
 ,   .   time -  ,
 ,      am ( -
 ),   pm (  ).      
     ,       -
     .  ,    
     .   day  .
    :  ,  
 ,    .  day   -
,       .
.
                              5-14


     ,      ,    
      , ..   
    .      
at     ,      . 
 ,  -,      vi  ,
   .     printfile.  
    :

            lp filename

      filename -    ,   -
 .
      printfile,   :

            at 11pm wed < printfile

          .   
  RETURN.    UNIX.  
   11   .
     ,   at      
 .     ,  -
     at.    
at -l.    :

     .  ID- .
     .  ,   (at  batch).
     .       .

           at   
     ID-  . -
   at -r       -
.
      at -r    :

            at -r ID-

     ,                
504510300.,   ,    :

            at -r 504510300.a

     ,         
 .
.
                              5-15


      /usr/lib/cron/at.allow  /usr/lib/cron/at.deny  -
  ,     -
 at.         -
 .      
at,       ,    -
.

     5.5.3       ?

      ps  " "   -
   ,     .  -
     ,      
.
            , -
:

            ps

       ,  :
      __________________________________________________________
     |
     |       PID   TTY   TIME   COMMAND
     |        49   2a    0:28   sh
     |     11267   2a    0:00   ps
     |

       PID    
,         
.  TTY   ,    
 .    TIME    -
 .   , COMMAND,   -
 .
              
   :

            ps -e

             ,   
 .        -t  
  . ,    -
    ,    2:

            ps -t2c
.
                              5-16


     5.5.4     .

                
INTERRUPT.     Del.    -
      .    
      :

            kill 0

           
:

            kill signal_number process_ID_number

     signal_number - .     
"" .       
 signal_number 9.  process_ID_number   -
 ps.
            
 shell.  ,         shell.
 shell-,     .  ps 
,  ,   ID-    , -
 sh  csh   COMMAND.  ,   
4831.    shell- :

            kill -9 4831

              -
.   !

_______________________________________________________________

     .

      ,     vi, -
     .  ,  -
 ,         
      ,  -
          kill.
      /tmp.     
       
  .
________________________________________________________________
.
                              5-17



     5.6       Shell.

      Bourne  shell,    C shell   -
 .       MS-DOS,  
,       UNIX   .  
         shell.
            "The Shell" 
"The C-Shell"  UNIX User's Guide.
      5.5.1         
     :

         cat /etc/tempcar /etc/tempcar /etc/tempcar > lagefile; \
         wc -c lagefile > characters &

                
 .
          vi ,  
command.file.       :

            cat /etc/tempcap > largefile
            cat /etc/tempcap >> largefile
            cat /etc/tempcap >> largefile
            wc -c largefile > characters

            command.file, -
 :x       vi.   
    ,    :

            chvod +x command.file

     ,    command.file    -
 :

            command.file &

      ,         
   command.file:

            cat characters
.
                              5-18


       ,    shell-
     .     -
   command.file :

            for name in /etc/tempcap
            do
                  cat $name $name $name > largefile
            done
            wc -c largefile > characters

       UNIX  ,      -
      chmod.  (    
 4  .)
.


                                6

             UNIX
     ___________________________________________________________


     6.1      6-1

     6.2          6-1
            6.2.1          6-1
            6.2.2       6-2

     6.3       6-2
            6.3.1        6-2
            6.3.2       6-4
            6.3.3        6-6

     6.4        6-7

     6.5        6-8
.
                              6-1

      UNIX   ,      
    UNIX     
  .        -
 ,  , 

     .     ,   ,
     .     ,
     .     ,
     .   "  ".

         .   
  -     ,   
    .
        .   -
   UNIX User' Reference.

     6.2        .

     UNIX  ,     ,    
     .      .

     6.2.1        .

      date    . :

            date

     ,       ,    
 :
      __________________________________________________________
     |
     |   Mon Jan 25 08:26:14 PST 1988
.     |
                              6-2

     6.2.2      .

      cal         -
,   . ,     
 1952 :

            cal mar 1952

         :
      __________________________________________________________
     |
     |    March 1952
     |
     |    S   M   Tu  W   Th  F   S
     |                            1
     |    2   3   4   5   6   7   8
     |    9  10  11  12  13  14  15
     |   16  17  18  19  20  21  22
     |   23  24  25  26  27  28  29
     |   30  31
     |

           .  
      .   
   ,        "-
"   .      .  -
 cal 88    88    -
,    1988.

     6.3      .

                    
    .     
 -  mail  write.   mail   -
  " "  .  write -
     ,  
   .     .

     6.3.1      .

                 
 mail,       -
 .      , 
 .   :

            mail login

       login    .
.
                              6-3


          ,       
   ,   
:

            Subject:

        ,     
.     test.
              .  ,
 Ctrl-d         -
. ,      -.    ~v
(,  v),          vi.
    ,      -
,   .      
 ,        -
.      mail,   -
 ,       .
          vi,    -
     :x,       Ctrl-d.   -,   
  ,        
:

            Cc:

      ,    ,  
 "  "   .     
    yourself, ..  
.         
,   RETURN.      UNIX.
            -
.       .   ,
   ,   schedule,    
 ,    ,     
, - Naomi  Bea.    ,   
:

            mail naomi bea < schedule

           .
       mail   .      ,
     ,  ,
 ,   ,   ..   
    UNIX User's Guide.
.
                              6-4


     6.3.2     .

       ,     :
      ___________________________________________________________
      |
      |  you have mail
      |

       ,         "-
".   , :

            mail

           . 
   :
      __________________________________________________________
     |
     |  1  john  Wed  Sep  21 09:21  26/782 "Notice"
     |  2  sam   Tue  Sep  20 22:55   6/83 "Meeting"
     |  3  tom   Mon  Sep  19 01:23   6/84 "Invite"
     |

       ,      ,  
 ,     ,      
,    .
          ,      
 RETURN.  ,     sam, -
 2   RETURN.   ,    
  (.    ).
      ,         ,  
   :   ,     /
  .
         d,    RETURN.
    " ",   ho, 
   RETURN.      -
 ,   s,       ,
 RETURN.       ,  
.
.
                              6-5

            .  
 r  R.   r,    ,  RETUTN,  
  ,      .   
      R,     
   ,      ,   
    .
       ,     -
  .     h   RETURN.   
       ,  -
 h+  RETURN.       18 
 .    18   h-.
            mail.  -
      joe,  -
  :

            mail joe

             6.3.1  (
 .)
         ,  q  RETURN.
       ,    .  -
:

     1.   mail.
     2.   rnumber,  number -  ,  
           .
     3.   RETURN.
     4.    . ,      ~v
                vi.
     5.       Ctrl-d.  
               vi,   :x
               Ctrl-d.
     6.   RETURN   .
     7.   restart.    mail  -
           ,       ,  
            .
     8.      ,       
            .     
             .
.
                              6-6


     9.    ,    q     
         mail.

     6.3.3      .

     UNIX  ,     -
    ,       
    .   write. -
,     joe:

            write joe

      ,       RETURN, 
   joe  :
      ___________________________________________________________
     |
     |  Message from login tty012...
     |

      login -   .   joe -
 :

            write login

     login - -   .
              -
 ,    joe.  ,  joe, 
     .     -
  joe  Ctrl-d   .        
 joe     .
           
       -
,    .  ,       ,
       o  (over),       - oo
(over and out).
          write,    .
    :

            write login
.
                              6-7


      login    .    -
 :

            Message from login ttynn...

         .       
 ,           
.
     ,     :
      __________________________________________________________
     |
     |  Hello Mark o
     |  Hello Mark o
     |  Remember, we have meeting at 12:00. o
     |  Remember, we have meeting at 12:00. o
     |  Right, see you there. oo
     |  Right, see you there. oo
     |

      Ctrl-d      .

     6.4      .

        UNIX    -
      .  , -
   UNIX      "",
     ,  -
     :
      __________________________________________________________
     |
     |  1/23 David's wedding
     |  2/9 Mira's birthday
     |  3/30 Paul's birthday
     |  4/27 Meeting at 2:00
     |  9/1 Karen's birthday
     |  10/3 License renewal
     |

         .  , -
    ,    
  .       -
,       .
.
                              6-8


      calendar       .   
    ,    .  -
     .
          calendar    -
 vi.        /  
() .       . , -
,      :

            9/7
            Sep.7
            september 7

     6.5      .

         bc    ,
     
.    ,     -
,   UNIX,   . ,  -
        bc,   -
   quit.      
     ,    .
.
                              6-9

     _                      

bc                               bc
123.456789+987.654321            
1111.111110
9.0000000-9.0000001              
-.0000001
64/8                             
8
1.12345678934*2.3                 
2.58395061549
19%4                            
3
3^4                              
81
2/1*2                            
4
2/(1*2)                          
1
x=46.5                            x
y=52.5                            x
x+y+1.0000                       
100.0000
obase=16                         
                                
15                               
F                               
16                               
10                              
64                               
40                              
255                              
FF                              
256                              
100                             
512                              
200                             
quit

      ,    , -
 ,       -
 C.   -     -
.      "bc:ACalculator"
 UNIX User's Guide.


Last-modified: Fri, 27 Mar 1998 06:29:51 GMT
: