:




            1.  

            1.1.  

                   -
             XENIX.     .

               " ",  
                      
            , ,         
                   . 
             , ,   ,      -
             .

                    
            "" , ,    , -
               ,      
                .
            _______________________________________________________

            

                         ,
                       
                 XENIX,      
                     ,    ,  
                      
                  .
                 __________________________________________________


            1.2.   XENIX

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

            1.3.     XENIX

             XENIX        
            XENIX.     -
                  
            ,       -
            .          ,  ,
            ,         -
            ,      .    
            XENIX    ""  "-
            "  .    -
                   


                                     - 1 -

             ,    -
                       
             .      
                  -
              ,     
                 ,   -
            .

              UNIX (  ,    XENIX)    
              ,   -
              ,        
                 -
            .   , XENIX     
              MS-DOS,   -
                       16  
            .    ,      DOS,
            XENIX  ,     
                      DOS.   XENIX
                 -
            ,    -
              ,   ,   
                Microsoft.

             ,   XENIX:

                 -       -
                     XENIX.        
                    , "shell"  XENIX 
                     .

                 -          
                   .    , 
                       .

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

                 -    ,  -
                      .

                 -      .    
                   XENIX      
                      ,    -
                       ,  
                      .      
                     ,     -
                        ,    
                            
                      .



                                     - 2 -

                 -  -"".

                 -        ,
                          -
                    .

                 -         
                       ,    
                         ,    
                         -
                   ,     .

                 -   ,  ,  -
                          
                      .

            1.4.    

                :

             1, "",      
            XENIX.

             2, "  ",      -
                XENIX.

             3, " ",     -
            ,       ,   
             .       -
              ,    ,  
            -.

             4, "", ,    -
                      
            XENIX.





                                     - 3 -

            2.  

            2.1.  

                  , -
                ,     
            XENIX,      .  ,
               ,    ,
             ,         ,  
                  .

            2.2.   ,     

             ,        ,    
                      
            XENIX.           
            .           
              - ;    ,
                   .   ,
            .   XENIX  mkuser(C)  -
                  -
              .

                       
            XENIX,        ,  
             .         ,
              ,       -  ,   
               . XENIX  
              ,  ,      
            ,      .  
            .    XENIX   -
                     
            .

            2.3.    

                  "login:"  
             .       -
            ,    , , ,  -
                 ,  
                  .   
              ,   -
              BREAK  INTERRUPT.

                   "login:",    
              ,      RETURN; 
               ,     . 
             ,    . , 
             ,     .    
                .    RETURN 
            ,    .    

                                     - 4 -

                 TERM=(unknown)

                (, ansi)  
            RETURN.

                      "-
            ",    ,  , 
               .    
               ('$')   ('%').

             ,          ,
            , :

                 You have mail
                 (  )

             ,      
              .

            2.4.   

             ,     -,  
              ,   . -
             :

                 date

               RETURN.        
            :

                 Mon Jun 16 14:17:10 EST 1985

                RETURN  ,  
                .   RETURN   
            ,   ,       
                .   
             RETURN     ENTER   CR,
                         
             .

             ,       ,
              who,     ,    -
            .    who   :

                  you   console   Jan 16   14:00
                  joe   tty01     Jan 16   09:11
                  ann   tty02     Jan 16   09:33


            ,    ,   
               ; ttynn -   
                ,    nn  
                   .   console   -   


                                     - 5 -

               ,    
               .

                   ,  -
                 . ,   -
            :

                 whom

               :

                 whom: not found ( )

             ,  ,     
            ,     XENIX. 

                 who

            

                 WHO

               ,  XENIX    -
             ,      .

                        ,
              echo. :

                 echo hello world

                    -
            :

                 hello world

               :

                 echo hello world>>greeting.file

                  echo      
                           ,   
            greeting.file. ,    
            ('>>')    ""   . 
            :

                 ls

             ,     .  -
              ,   :

                 cat greeting.file

                                     - 6 -

             "cat"   (concatenate).   
               cat -   -
                        .
            ,         
            XENIX    , cat     -
                  .  -
            ,       
               :

                 hello world

               greeting.file, :

                 rm greeting.file

            ,     XENIX  -
                 . , cp 
              "copy", ls -   "list", cat -
                "concatenate",  mkdir  -   
            "make diretory",    chmod  -      "change
            mode".

            2.5.    

                    ,  
               ,  ,  
                  RETURN.      BKSP
                 . -
                 BKSP     
               ,    .   ,
               - ,   -
             .  , :

                 ddBKSPateRETURN

               ,  

                 dateRETURN

               Ctrl-u      
                  .   ,  
             ,  Ctrl-u      
            .

                BKSP  Ctrl-u   ,
                   ('\'), 
                 "" -
            .      BKSP  Ctrl-u  , 
            "\BKSP"  "\Ctrl-u".        
                     Ctrl-u,   
                .     
             Ctrl-u  .



                                     - 7 -

                ,   -
              BKSP    :  "\BKSPBKSP".  
                     XENIX  
            ,    ,       
              . ,  , -
                BKSP   Ctrl-u   
             XENIX,  ,    -
                       
              stty(C).

            2.6.        

             XENIX        ,
              ,         
            ,    ,    ,   XENIX
              ,   .      
            ,       , -
                      
             ,         -
                  .  ,
                 (.. "   -
            ")   ,    
            .  ,          
                ;       
            ,         
                ('$').

            2.7.    

                    .
                    -
            ,    ,    , 
             ;      
              .    
            Ctrl-q.     -
            ,   (      -
            )     . Ctrl-s
               ,    Ctrl-q  
            .      ,  
               ,    Ctrl-q    ,
                  stty(C)    
             XENIX      
                .  
             , " ".

            2.8.   

                    -
                  ,     INTERRUPT
            (             DEL,
            DELETE,   Ctrl-c    RUBOUT).      
              BREAK,    -
            .      , ,  


                                     - 8 -

              ,    INTERRUPT   
              ,      -
            ,      .
                    " -
            ",     INTERRUPT.

            2.9.    

                       XENIX,  
                  .     
            Ctrl-d      .    
              ,        -
            .       -
             Ctrl-d,    .

            3.  

                  ,  
                     XENIX. 
             ,   ,    
            ,   ,    , 
                      
             .       -
            .

            3.1.  

                  XENIX.
               XENIX     
            :   (,       ,
                ""),     .
                 .

            3.1.1.   

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

                 -   (  ).

                 -       ,  
                    i-.

                 -   .

                                     - 9 -

                 -  .

                 -  .

                 -   .

                 -   .

                   
                    
             .       -
                     --.
                  -
              ,    
            .   ,   
              .       
            .  ,       
            ,  ,      .
                    chmod.
                 4  .

            3.1.2.   

                ,
            ,       , , -
               .      "
             ".      .

            3.1.3.  -

            -  -    ,       
            ,            
            ,      (     )
              .     
              i-     ,  -
                 .   i- - 
             ,     .  
                       i-. 
            / i-    ().  
            ls       
            ,       .  
              i-    ls       
              .

                    -  
            ,     XENIX  -
                  .   
               .

               ,       
                      
                .  
                     


                                    - 10 -

            --.          
               ,  -
                .    
            ,         -
             .  ,    
              ,      ,  
               . ,  ,  -
                     ,  
                .      
              ,       -
             chmod.  ,    ,
                umask.

            3.1.4.   

                    -
              ,    
               .  ,  -
             , XENIX    
              .   
                    ,  
                   -
            .   "" -  .   -
                   .    
                    
            ,         
              .

                ,       -
            .          
             ,       
            .        
                  -  .

                  
             3-1.

                              usr
                              /|            /  |            /    |           adam   eve   mary
                       /     /            text1  /          text
                         text      temp
                    3-1   .


              3-1  usr     
             .  ,     text 
             mary         
                 eve.    ,  
                     eve,  
                  eve  mary  ,
                  ,      
            ,       -
               .   ,      mary   


                                    - 11 -

                eve, :

                 pr /usr/eve/text

                eve    ,    
               mary:

                 ls /usr/mary

            3.2.   

              -      ,  
              .    XENIX   -
                ,    -
            , , ,   .  -
            ,   XENIX - ,  
                .

                    ,
                XENIX    , 
              " ".     3-2
                   -
            .         -
              ,      . 
             i-   ;      -
              "".     
                 ,     
             ""   .  -
                ,        (
                ),        
             .      
                  . -
                    -
                 XENIX,    -
            .

                               / ()
                              /|            /  |            /    |           bin    usr    dev
                       /      /            cmd    /         tty
                         doug     neil
                         / |       |        /   |       |       mail  news   text  data
                  3-2   


              3-2 ""    . 
            bin,  usr, doug  neil     
            .   XENIX        ,
                    "/".   mail, news,
            text  data     ,    
             "" . ,   cmd - 
             ,    .    tty  -
                  .



                                    - 12 -

            3.3.     

              XENIX  ,    -
                 ,     
             (          ).
                  -
                 .   
                 ;    
                     
                   .    -
                       John
            Albert  Smith,           
                   John.

            3.3.1.   

                  
                 ,   -
               ('/').   ,      -
               .     -
              .  ,    
                      -
            .         -
            .

              ,        -
                 ,     -
               .       
                ,   -
            .          ,
                    ""     
             ls.    ls      -a  
              .    ('-')    
             ,     
                    .    , 
                        
            ('?'),    ('*'),    ('['  ']'),  
            ,        -
               .

            3.3.2.    

                       ,
                   -
            ,        ('/').  
                    , 
              ,       -
                 .    
              " " (  -
              " ").   
                    -
            ,          .
                 ,  


                                    - 13 -

                       -
            .

              ,       ,
              "     ",  
                   -
            .      ,     
              ,    "  
              ",         -
              .       
                   cd.   -
                 pwd.

            3.3.3.    

                 :

            /          
                 .

            /bin ,        
                    XENIX.

            /usr ,    .
                  /usr/bin    -
                    XENIX,    
                 /bin.

            /dev ,  ,    -
                   (,  , 
                  ).

            /dev/console
                    .

            /dev/tty
                   .

            /lib ,  ,  
                  .

            tmp      .

            /usr/joe/project/A
                    ;        
                  A   project,  -
                  joe.

            bin/x
                   ;      -
                   x     bin   -
                 .       (/),
                           /bin/x.    


                                    - 14 -

                   /usr/joe,     
                 /usr/joe/bin/x.

            file1
                      .

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

            .       .    
                 ./xxx        xxx,    
                    .

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

            3.3.4.   

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

                   
            . ,    ,  -
               .   ,    
              :

                   chap1
                   chap2
                   ...


                       
            :

                                    - 15 -

                   chap1.1
                   chap1.2
                   chap1.3
                   ...
                   chap2.1
                   chap2.2
                   ...


               ,       
               .

                 -
                ,    . 
            ,          -
            ?   :

                 lpr chap1.1 chap1.2 chap1.3 ...

                    .  
            ,    :  ,
              ,     -
             .   :

            *        .

            []       .

            ?       .

            ,   :

                 lpr chap*

              XENIX    ('*')    "  
                  ",   
             ,   "      
            ,      "chap"".

                      
            lpr;       .

              ,         
            , :

                 ls chap*

               :

                   chap1.1
                   chap1.2
                   chap1.3
                   ...


                                    - 16 -

                   
                ;         
               .         
              ,     -
                   .  :

                 cat *

                       
            .

                  
                .  ,  
                 1  4  9.  
            :

                 lpr chap[12349]*

             ( [  ] )  "   
              ".     
              ,     
              , :

                 lpr chap[1-49]*

            ( ,     49 ,
                .)       
             : "[a-z]"     
            "a"  "z".

                 , 
            

                 ls ?

              ,      , 

                 ls -l chap?.1

                      (..
            chap1.1, chap2.1 ...).

                 
               ( '*', '?'  [...])  - -
              -,      .
            ,         
             "?",       :

                 ls '?'

                   
            ,     4 " -
             XENIX", "  ".


                                    - 17 -

            3.4.  

                   .
                  , XENIX  
            ,         ,    
              ,    .     
              ,     
            ,    .  
                       
            .

            3.4.1.   

              ,       ,
                  , XENIX  -
                .   - 
              ,     
                 ,    
            .       -
                 ,  -
              ,   ,  
               .      
                     
             .  ,       
              ,      ,
               ,  
                   RETURN.
                   -
             BKSP  Ctrl-u.   RETURN  
                .   -
                     
            .     INTERRUPT  , 
                RETURN,    -
            .        
            ,  ,     
              (';'). ,     
              ,     :

                 date; pwd

                        
            ,      ('&') 
              .           
            ""    c.  -
                  
              ,        
             .  

                 du /usr>>diskuse&

            ,          ,  
                   /usr, 
             ,   .  ,  


                                    - 18 -

                    diskuse   
                .     -
               3.6.1.

            3.4.2.  

               :

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

              ,          
            .       -
            .       -
                .     
            ('-')   . ,   
            ls  -l  (  " ")  
              ,  

                 ls -r

                     
              .        
            ,    .   -
            , 

                 ls -rl

                ,   -rl
            ,       -
                 .

                 , 
             :

                 copy -a -v  

              -a ,       
                  
            .   -v  ,    
                 .

                    ,  ,
              ,   :

                 grep ' ' _

              

                 ' '

                     ,
              grep   _.  -
              ,       ,


                                    - 19 -

             .

                 -
            ,          C  
            -    .      
                , -
             "   ". 
                   4      XENIX
            "  ".

            3.5.    

             ,   XENIX ,  
              c    ,      
              .        
               , :

                 cat

                 .   
                  ,   -
               Ctrl-d      
             .

             :

                    RETURN
                  RETURN
                 Ctrl-d

               Ctrl-d,  .    cat
                    .  
                  ,  
               .    
              :

                 $ cat
                   
                   
                 
                 

                   
              ,       , 
              ,      
              ,    .  ,   -
             ""    ,  
                  .  -
             -       -
                .     
            cat  ,         -
              ,     ,   
             Ctrl-d    .


                                    - 20 -

            3.5.1.  

              XENIX         
                ,   . -
            :

                 ls

                     .  
              

                 ls > _

                    _
            (    ,       -
            ).  ,         
            ,      ('>>'),  " 
               ,      -
            ".         
                    ,  
              cat  :

                 cat f1 f2 f3 > temp

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

                 cat file1 file2 file3 > temp

             " file1, file2  file3     
            temp,   ,    , 
               ".     
              ,   temp  ,
              .

            ,     ('<&lt;')  
            "        , 
            ".       -
                    
             script.       
               :

                 ed  < script

                   
                letter.txt,      
             :

                 mail adam eve mary joe < letter.txt


                                    - 21 -

            3.5.2.   

                  XENIX  
             " ".   
            -          
              ,  ,     
             ,  .

            :

                 sort frank.txt george.txt hank.txt

                 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

                  ('|')    
              sort   uniq   ,  
             sort,      ,
                    
            uniq,              
             more  .

                 -
            .   ,      
                      -
            :

                 ls | pr -3

             wc   ,    
              ,   who   -
            ,    ,     
             .  ,    
             ,   ,  
                 who:

                 who | wc -l



                                    - 22 -

                    
            :

                 ls | wc -l

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

             ,      -
            ,            
            .  ,      -
            ,        . 
                  ,    
            .

            4.  

            4.1.  

               ,      
                    XENIX.   ,
                  ,    
                XENIX.

            4.2.     

             ,     XENIX,    
                   .   
               .        ,  
                 .  -
              ,       ,
             .

            4.2.1.    

             ,       ,    
            "".       
             ,         
                .

                     -
            ,  ,        
                ,     
               - .      -
              ,    
                    -
             mkuser(C)          
            XENIX.       ,  


                                    - 23 -

                 .

            ,     ,    -
                "login:".        
              ,      
             INTERRUPT.

               "login:",   -
              :

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

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

                     ,
                  "-".   
               ('$').    ,  -
             XENIX     .

              ,   :

                  Login incorrect
                  login:


                ,    
              .        , 
                    ;
                         
            .

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

            4.2.2.    

               ,   
            

                 Ctrl-d

              .   ,   XENIX Ctrl-d
              ,     


                                    - 24 -

                  .  
                Ctrl-d     ; 
                ,    -
                .   ,     -
               Ctrl-d  ,     -
            .   ,       mail,
                 Ctrl-d  ,   
                ,     ,   
            .

            4.2.3.   

             ,     -
                ,  
                .      
                   , 
               .  
              XENIX  ,        
                . 
              ,         ,  
                     -
            .    ,   .

                   passwd.  
            :

            1    :

                          passwd

                   RETURN.   :

                          Changing password for 
                          Old password:


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

            3     ,      , -
                  :

                          New password:

                       RETURN.

            4     :

                          Re-enter new password:

                     .    ,


                                    - 25 -

                  RETURN.   :

                          They don't match; try again

                        1.      
                   ,    -
                 .

            4.3.     

                    
                 XENIX.    XENIX
                      
            .     ,   -
             ,   ,      
            .   , ,   -
                .      
              .

            4.3.1.   

             ,     ,    
              .      - 
                  ,  
            ,        , , ,
              .      -
                .profile   -
             .   ,   
                  tset,   -
             :

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

              unknown ()    -
            .  ,         
             vt100,    :

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

                       -
             :

                 TERM = (vt100)

             RETURN,  vt100        
              ,     
              RETURN.


                                    - 26 -

            4.3.2.    

                  ,   
                  stty.   
                     
            .  ,       
            :

                   speed 9600 baud
                   erase '^h' ; kill '^u'
                   even -nl


                    
                    stty.  
               stty(C)  
             XENIX.

            4.4.    

                       
            ,      -
             .       .

            4.4.1.    

                    
                 RETURN.  
            RETURN         
                  .       
             ,   ,   
              ,     XENIX 
               .

            4.4.2.    

                    
            ().         ,
             Ctrl-u.

            4.4.3.     

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

                                    - 27 -

            4.5.    

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

            4.5.1.   

                     ,  -
              vi,     2 
             XENIX, "vi:  ".    
            -         ,
            :

                 > _

             _ -    .    ,
                  .

            4.5.2.    

             more     -
            .   :

                 more  _

            more  ,       -
              ,      .  ,  
               memos, :

                 more memos

            more     ,    -
                 ,    
            .

              :

            +_
                    ,   
                 _.

            +/
                       ,   
                 -     .     
                   ,      
                 .

            -c       .



                                    - 28 -

            -r     ,    -
                 .

            ,     memo  , 
               "net gain", :

                 more +/"net gain"

                   ,      
                   . 
                    
            :

            RETURN
                     .

            d        .

            
                     .

            n
                    n .

            .      .

                   ,
              .

                    
             /.

            ,      "net gain", -
            :

                 /net gain/

              RETURN. more  :

                 ...skipping

               ,         ,
                     -
              "net gain".

                  more   ,
               ,     vi,
            :

                 v

              2  "vi:    "  
              XENIX      


                                    - 29 -

            vi.

            more   ,    
              .          
            , :

                 q

             head  tail , ,    
                .    
              .

            ,         
            memo, :

                 head memo

                ,  -
             head  tail. :

                 tail -4 memo

                 memo.

             cat    .   -
                  ,     Ctrl-s, 
             .    Ctrl-q,      
            .       
               .       
            ,    INTERRUPT.     
             , :

                 cat file1

                , :

                 cat file1 file2 file3

            4.5.3.   

             cat     -
               .

             ,       file1  
            file2      bigfile, :

                 cat file1 file2 >bigfile

            ,        -
                     bigfile.   ('>&gt;')
                  cat  
             .



                                    - 30 -

                 cat  
                 . ,  
            file1  file2, :

                 cat file1 >> file2

             file1   file2. file1    
               .

            4.5.4.   

             mv           
             .

            ,    ,    ,
             ,   , :

                 mv  

                     
                    ,    
              .

                   ,    
                  mv   
            . ,      
            file1  file2   /tmp, :

                 mv file1 file2 /tmp

                    
            ,      /tmp. 
                ,    
              :

                   mv file1 /tmp
                   mv file2 /tmp

             mv  ,      
                ,     ,  ,
                   -
            .

            4.5.5.   

              ,   "" 
                 :     .
             ,  ,        
             anon  johndoe, :

                 mv anon johndoe

                                    - 31 -

            ,           
                 .

            4.5.6.   

                cp:       
              ,      
              .   ,      
                 filer, :

                 cp file1 file2 file3 filer

                    
            filer;        -
            . ,        .
                 mv, cp  ,   
               ,    , 
            ,    ,   
            .

                    ,
                     .  , 
             ,      -
             :

                 cp file filecopy

                      
                   -
             .         
               4.6.7, " ",  
            .

            4.5.7.   

                , :

                 rm file1 file2

               file1  file2   
            .

            :

                 rm -i file1 file2

                  , -
            ,           
             file1   file2.        y,    
            RETURN,       ;    n,
               .        
             ,    .



                                    - 32 -

            4.5.8.   

             find        -
            .         
               ,    ,
               ,    .

               :

                 find _ -name _ -print

             _ -      ,      
              .   find     ,
               ,    
             ,  _.

             -name ,         
            _.   (    
              find,  find(C)   -
               XENIX.)

            _ -   ,    .

             -print ,         
                    ,  -
              _.    -
                 ,   -
             ('>&gt;').  (   , 
                find,  
              ;  find(C)   -
              XENIX.) ,    
               memo   /usr/joe    -
            :

                 find /usr/joe -name memo -print

            ,  ,    :

                   /usr/joe/memo
                   /usr/joe/accounts/memo
                   /usr/joe/meetings/memo
                   /usr/joe/mail/memo


            4.5.9.              (-
            )

             ln        
              ,         -
            ,       .       
            ,       
            ,    ,      -
                    .      


                                    - 33 -

             :

                 ln  _

              -   ,    _  -  ,
                  -.  , 
               memos   /usr/joe  -
             joememos   /usr/mary:

                 ln /usr/joe/memos /usr/mary/joememos

               /usr/joe/memos    ,    
              /usr/mary/joememos.

                 ,  - -
              i-.  i-   
              .          
                  .    ,   
              ,        1/1   
            2/2  .

              ,    :

            1.           
                          
                          
                 .

            2.        -
                  ,       
                 , ,   ,      
                  -.

            3.               
                     .     ,  -
                 ,       .   ,
                    ,    ,
                    .

               . ln(C)    
            XENIX.

            4.6.    

            -      -
              XENIX     -
            .      
                .    
              ,        .
               ,    
              .

                                    - 34 -

            4.6.1.      

                 .
                 pwd,  -
             "print working directory" (    -
            ).  ,      /usr/joe, 
              :

                 pwd

             :

                 /usr/joe

                  ""    
             .

            4.6.2.    

                  lc.  
                        
             ,    .    -
                ,  lc    -
            .   lc   :

                 lc  

            ,     work,  -
            :

                 lc work

                :

                   accounts   meetings   notes
                   mail       memos      todo

                ,  lc      
            .  , :

                 lc

                   .

                    
             lc:

            -a        ,    ""
                  (     , 
                 .profile  .mailrc).

            -r        .



                                    - 35 -

            -t      ,        
                   -        (
                 ).       -r
                      (  -
                 ).

            -R            ,
                       ,    "" 
                   .   "R"    "recursive"
                 ().

            -F       ('/'),   -
                    ('*').

             ls  ,    lc,   -
             ,       
            ,   .  ls -l   
             ,    :

                  total 501
                  drwxr-x--- 2 boris grp1 272  Apr 5 14:33 dir1
                  drwxr-x--- 2 enid  grp1 272  Apr 5 14:33 dir2
                  drwxr-x--- 2 iris  grp1 592  Apr 6 11:12 dir3
                  -rw-r----- 1 olaf  grp2 282  Apr 7 15:11 file1
                  -rw-r----- 1 olaf  grp2 72   Apr 7 13:50 file2
                  -rw-r----- 1 olaf  grp2 1403 Apr 1 15:22 file3

                   -
             ( ):

                 -  

                 -  

                 - 

                 - 

                 -   

                 -   

                 -  

                    ,    
              ,     4.8 "
                ".

                   -
             ls(C)    XENIX.


                                    - 36 -

            4.6.3.   

                        
                mkdir.  ,    
                phonenumbers,  :

                 mkdir phonenumbers

                    
                .

            4.6.4.   

              ,      
            ,      rmdir. , 
                phonenumbers      ,
            :

                 rmdir phonenumbers

             phonenumbers      ,    ,
                 ;   -
                .    
              ,     -
                   rm,
                 .   -
                rm(C)    
             XENIX.

            4.6.5.   

                     mv.
            ,        little.dir  
            big.dir :

                 mv  little.dir big.dir

                ;    
            .

            4.6.6.   

             mv   .   -
             :

                 mv _  _

             _ -  ,     -
            .

            ,    /usr/joe/accounts 
            /usr/joe/overdue, :



                                    - 37 -

                 mv /usr/joe/accounts /usr/joe/overdue

                       /usr/joe/accounts    
            /usr/joe/overdue.  ?????.sh 3 "  "

             copy   .      
            :

                 copy  _ _

                   /usr/joe/memos
              /usr/joe/notes, :

                 copy /usr/joe/memos /usr/joe/notes

                     usr/joe/memos      
            /usr/joe/notes.   copy   :

            -l       (  -
                 )   .

            -m              
                 ,     .

            -r     , ..  
                    .

            4.7.     

                XENIX     
                 .  -
               ,       
                .        
              -       .
                 ,  -
             .  ,      
                      
            ,  .

            4.7.1.   

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

                 pwd

              :

                 /usr



                                    - 38 -

            4.7.2.    

                  
             :  ",   "   XENIX.
             ,    ,   
            " " - cd:

                 cd

                    .
                   ,   
               cd.

            , :

                 cd /usr

                /usr.       
            ""      ,    
            ""     .

                  , :

                 cd ..

            ,           
            /usr/joe/work  /usr/joe.   :

                 cd ../..

               /usr/joe/work   /usr,    
               .

            4.8.       

             XENIX     -
                  , ,   ,
               ,    .
                  ,    
              ,   ls -l.  
                :

                  total 501
                  drwxr-x--- 2 boris grp1 272  Apr 5 14:33 dir1
                  drwxr-x--- 2 enid  grp1 272  Apr 5 14:33 dir2
                  drwxr-x--- 2 iris  grp1 592  Apr 6 11:12 dir3
                  -rw-r----- 1 olaf  grp2 282  Apr 7 15:11 file1
                  -rw-r----- 1 olaf  grp2 72   Apr 7 13:50 file2
                  -rw-r----- 1 olaf  grp2 1403 Apr 1 15:22 file3


                   
               .     dir1,  


                                    - 39 -

              ,   -
            :

                 drwxr-x---

                .     -
            :

            -      .

            d     .

            c            
                 , ,   .

            b         ,
                 ,    .

            n         (..  ,
                       
                 ).

            s       .

            p      ,  -
                  .

              ,  ,  
                     .
                :

                 - 

                 - 

                 -  

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

                     
            :

            r      

            w        (  )

            x      



                                    - 40 -

            -      

                  :

            r        ;    "x"  
                   .

            w          ;  
                 ,        "r",   "x"   
                 .

            x        .      -
                        cd, -
                    ,     -
                 ,         
                  "x".  ,      
                   "x",   -  
                 .

                  -
              :

            d---------
                  .  ,   
                    .

            drwx------
                       .      
                    lc,  , 
                 ,           
                        cd.   
                    .

            drwxr-x---
                        .    
                    lc     
                           .  
                       , 
                  cd,           
                    .     -
                 ,      
                   .

            drwx--x--x
                      ,  -
                   ,      
                 lc,              
                  cd.

                  ,  
              .      
              ls(C)    XENIX.



                                    - 41 -

            4.8.1.    

                   
            chmod.   ,       -
             ,        
            ,    .

              chmod :

                 chmod  _

                   
                .  
                  -
            :

            u    ,    .

            g    ,   .

            o     -   .

            a      .

                :

            r     -      -
                 ,      .

            w     -      -
                     .

            x      -       
                    .

            , ,   file1   -
              :

                 -rw-r-----

                       
            ,     ,   -
                  .

             ,      file1    
            , :

                 chmod a+r file1

               (a+r), "a"  "all" ().

                   -
            :


                                    - 42 -

                 -rw-r--r--

             file1    :

                 -rw-------

                    
              :

                 chmod g+wx file2

                  :

                 -rw--wx---

                    
              , :

                 chmod ug-wx file1

            4.8.2.      

                    .  
                ,    -
            ,       .     
                - ,   
                    .

            , ,   dir1  
            :

                 drwxr-xr-x

                  -
            , :

                 chmod o-xr dir1

                 :

                 drwxr-x---

            4.9.   

                     -
            ,   , ,  .  -
             XENIX     
             .     
                  .



                                    - 43 -

            4.9.1.   

                       
              diff.        -
            ,  .

            , ,      men  
             :

                     
                     


                women  :

                     
                     


               :

                 diff men women

             :

                 1c1
                 <     
                 ---
                 <     


                    
             diff3.       
            diff3(C)    XENIX.

            4.9.2.   

             echo        .
            , :

                 echo "Now is the time
                  For all good men
                  To come to the
                  Aid of their party"


             :

                  "Now is the time
                  For all good men
                  To come to the
                  Aid of their party"



                                    - 44 -

             echo       
                    shell.   C.    4
            "  "    -
             XENIX.

            4.9.3.   

                       
                sort.    , sort 
                       
            ASCII, . .   .

            ,       phonelist,
            :

                 sort phonelist

                   
                 .   -
              phonelist   phonesort, :

                 sort phonelist > phonesort

            ,  sort     
            .  ,       
            who, :

                 who | sort >whosort

                who,    
                whosort.

              sort       .
                .   sort(C)  
             XENIX.

            4.9.4.     

             grep      , -
                  . , 
                ,      "tty38",
            :

                 grep 'tty38' file

            ,        
               ,        
             .

               ,    
               phonelist,   ,  
               .    ,    
                        .      


                                    - 45 -

              grep,    
                Joe,         822. 
               :

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

            grep   ,    "Joe".  
                     
            grep,   ,   "822-"  
                 Joe.   -
            ,  ,      
            Joe,          822,    
                joes.number.

                  grep,
               ""   fgrep  egrep, 
             ,      (  
            "  "),   grep(C)  -
              XENIX.

            4.9.5.   ,   

            wc -          .  
            'wc'  word count ( ). -
            ,     ,  -
            ,      . wc 
                  ;      
              .

            ,    ,   
              textfile, :

                 wc textfile

               ,     
              :

                 4432 18188 97808 textfile

                   ,    
            ,     -
             .

                  -
                 :

                 wc -c textfile
                     97808 textfile
                 wc -w textfile
                     18188 textfile
                 wc -l textfile
                     4432 textfile



                                    - 46 -

                  textfile, 
              ,    .

            4.9.6.     

             at      
            .   ,     
              ,       
            .

             at      
            :

                 cat  | at  

             -   ,      
              .    -   ,  -
            ,    "am"   "pm",    -
            ,  ,        .
            ,     , 
             ,    -    . 
               .

             .    ,   -
                ,   .    ,
              .

            ,    ,    
                        , 
            ,           
            use:

                 ps -a > /usr/myname/use

            (       ,  
               4 "vi:  "   -
             XENIX).

             ,     , :

                  cat use | at 10pm tues

             RETURN.     XENIX  
                 .    ,
             ,  XENIX      ps  -a  
                 use.     
            at  .

             ,  ,       -
            ,   at   -l.  
            ,      ,   
              .    -
            :


                                    - 47 -

                 -  .

                 - ,    (at  batch).

                 -   ,     .

               ,   
                    -
            .     at  -r    
                .

             at -r   :

                 at -r 

            :

                 at -r 504510300.a

                504510300.a,   ,
                 .   
               .

            4.10.   

               XENIX        
            .  ,     
              "  ",     
                    .  -
            ,     ,  
              .     ,    
             ,       
            ,      .    
                     
            ,          
               .         
                .

            4.10.1.      

             ,   ,    
              ;    -
              ,      .
                  . 
              ,      -
                 .       
               ,    
            .

             ,          ,
                ('&')     . ,
                   ,
                 - , :


                                    - 48 -

                 wc file1 file2 file3 >count&

                 count.     -
              ,       -
                 .

                 ,   
                   . , 
            INTERRUPT,        .  
                  kill,  
             .

            4.10.2.    

                , 
                    INTERRUPT.  
             ,    .   ,
                 ,   -
             , :

                 kill 0

              -     ,
             :

                 ps

             ps      (PID)    
             . :

                   PID TTY TIME CMD
                  3459 03  0:15 -sh
                  4831 03  1:52 cc program.s
                  5185 03  0:00 ps

              ,   :

                 kill 4831

             4831  -      ,    
             .
            _______________________________________________________

            

                  ,       vi,
                           .
                  ,  ,    -
                           
                   ,    -
                     kill.      -
                    /tmp.    -
                      .


                                    - 49 -

                 __________________________________________________


            4.11.     

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

            4.11.1.     

             who  ,       
                  ,    
              . , :

                 who

                  -  
            :

                   arnold  tty02  Apr  7   10:20
                   daphne  tty21  Apr  7   07:47
                   eliot   tty23  Apr  7   14:21
                   elen    tty35  Apr  7   08:36
                   gus     tty26  Apr  7   09:55
                   adrian  tty28  Apr  7   14:21


              finger        ,
            ,         
             .     -
                ,  finger(C) 
              XENIX.

            4.11.2.    

                      ,
               ,     .
             ps  "process status" (  )
                   ,  
             . ,   ps  -
              :

                    PID TTY TIME CMD
                  10308  38 1:36  ed chap02.man
                     49  38 0:29  -sh
                  11267  38 0:00  ps

             PID    ,


                                    - 50 -

                     -
              .  TTY   -
            ,     .  TIME 
                .      
                kill.    
              ,    4.10.2  "
             ".

             ,    ,    
            ,   -a:

                 ps -a

              ,     -
            ,   -t,    
            . ,    ,   -
                 13, :

                 ps -t13

                  ps  
             ,  ps(C)    XENIX.

            4.11.3.     

                  , -
                ,  lpstat. lpstat -
                       
            ,  .

             ,       
              (  ),     -
              .          
               lp,    
             .   :

                 -_

             -   ,    
              (   ,  -
              ),  _ -
               ,   .

                , :

                 lpstat _

            lpstat      ,     
                ,     -
            .

             ,         
            ,    , :


                                    - 51 -

                 lpstat

            lpstat       -
                 .

              ,       
            ,   lpstat   -p.   
              :

                 lpstat -p 

              lpstat     -
                  ,   
             .

             lpstat         
             XENIX   lpstat(C).

            4.12.    

             XENIX,  ,    -
                   -
               .         
                    , -
                     
                .      
            XENIX   ,       
                   , 
                ,  
               .

            4.12.1.   : lp

                ,      -
                 lp,   lpr. 
              .         
             lp.

            ,          
            memo, :

                 lp memo

                  .  -
            ,    memo, report  letter, -
            :

                 lp memo report letter

                 , lp     
                  .
             , ,  :



                                    - 52 -

                 pr4-532

              ("pr4") -   ,   
              .   ("232") -
              .        
                  ,      -
            ,        -
            .       4.12.3, "
              ",   4.12.4,  "    
              :lpstat".

                    -
              ,      -
            .

            lp          
            .      -
             pr.           
             textfile, :

                 pr textfile | lp

             ,       
             datafile, :

                 sort datafile | pr | lp

            4.12.2.     lp

              lp    ,    
               .

                ,  -n,      ,
                    . , 
                  report, :

                 lp report -n2

             , -d,     
             , .. ,     -
              .      ,  
              .     
              report   quick, :

                 lp report -n2 -dquick

              :

            -c      .   
                         ,
                    .

                                    - 53 -

            -m        ,      
                 .

            -o     . ,   -
                   ,      -
                    12- .   
                        
                  ,    .

            -r      .

               lp      -
             XENIX   lp(C).

            4.12.3.      : cancel

                  .  ,  
                   laser-
            245, :

                 cancel laser-245

             cancel     ,
                  .

             lp   ,   -
                     .  
            cancel          
              ,       
            ,     .

            ,     ,  
                      slow,
            :

                 cancel slow

                   ,    
                   , 
                .

            4.12.4.              :
            lpstat

             ,      ,
             , :

                 lpstat

            lpstat    :


                                    - 54 -

            __________________________________________
           | prt1-121    chrisw   450    Dec 15 09:30|
           | laser-450   chrisw   4968   Dec 15 09:46|
           |                                         |
           |                                         |
           |_________________________________________|


                    
               ,    ; 
                      .   
                ,    
             ,       ,
                 .

                , -
               lpstat    .
            ,  ,      
                      daisy-256,
            :

                 lpstat daisy-256

            lpstat             
            .

                  
                    -p    -
             ,   .

             ,       
             , :

                 lpstat -p

             ,          
             quick, :

                 lpstat -pquick

            lpstat          
                 ,    -
                  quick.

               lpstat      
              XENIX   lpstat(C).



                                    - 55 -

            4.13.     

                XENIX    -
              ,     
             .         
            .

            4.13.1.   

            mail    , 
                      
             .       -
              , :

                 mail joe

             joe -       .  
               ,    -
            .      trl-d.

                     
            , , :

                 mail -s "C " joe
                   2:00  
                    
                   .  Ctrl-d

                 -s  
             .

            ,      .  (     
            ,        - 
                  -
                -.)      -
              ,       
              .   .  
            3, "",   XENIX    
            mail(C)    XENIX.

            4.13.2.   

                ,      
            :

                 You have mail
                 (  )

               , :

                 mail

                                    - 56 -

                      
                .       RETURN,
                   .  
            ,       RETURN,  -
               ,      
             .

             ,    , mail  ,
                ,          .  
                     :
            'd',    ,     ,  RETURN,
                 ( , 
                     
            ,    - ).  -
                ,  'q'.  -
              .    XENIX   -
             mail(C).

            4.13.3.     

                     
             ,   write. -
            ,        
            joe, :

                 write joe

             ,    ,  RETURN, 
                     
                   joe.
                    ,
                Ctrl-d.

                      
                  -
             ,  'o' ( "over" -  -
            );       -
            ,    "oo"  (  "over  and
            out").

            4.14.          -
            

             XENIX     ,      
                  ,     
                .     
            .


                                    - 57 -

            4.14.1.      

             date    . :

                 date

                .

            4.14.2.    

             cal         
              .     :

                 cal  

            ,        1952  ,
            :

                 cal 3 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  85"  
               1985 ,   85 .

            4.15.        -
            

                  XENIX 
                .     
            XENIX    calendar   
                  calendar, -
               , , :

            1/23   

            2/9    

            3/30   ..

                                    - 58 -

            4/27  2:00 

            9/1    

            calendar     , 
              ,      
            .          -
             ,     .

            4.16.         -
            

                       
            ,      
              ,    su.  su -
                  ,      
            .

            ,    joe, :

                 su joe

              RETURN.      
            ,     .  -
               su     
             ,  Ctrl-D.

            4.17.  

             bc    -  -
             ,   ,  -
            .       bc.
              ,     
            .

               /*   */
               123.456789 + 987.654321 /*    */
               1111.111110
               9.0000000 - 9.0000001 /*    */
               -.0000001
               64/8 /*    */
               8
               1.12345678934 * 2.3
               /*     */
               2.58395061548
               19%4 /*   */
               3
               3^4 /*    */
               81
               2/1*2 /*  */
               4
               2/(1*2) /*    */
               1


                                    - 59 -

               x = 46.5 /*   x*/
               y = 52.5 /*   y*/
               x + y + 1.0000 /*    */
               100.0000
               obase=16 /*  16-    -
               */
               15 /*   16-  */
               F
               16 /*   16-  */
               10
               64 /*   16-  */
               40
               255 /*   16-  */
               FF
               256 /*   16-  */
               100
               512 /*   16-  */
               200
               quit /*     */

              ,    ,   
                    -
               .     -
                    .
                   
            5, "bc: ",   XENIX.





                                    - 60 -

                                  



            1.   .....................................    1
            1.1.   ......................................    1
            1.2.   XENIX ..............................    1
            1.3.     XENIX ............    1
            1.4.     ........................    3

            2.   .............................    4
            2.1.   ...................................    4
            2.2.   ,      ........    4
            2.3.     .............................    4
            2.4.    ................................    5
            2.5.     ..........................    7
            2.6.         ..    8
            2.7.     ...............    8
            2.8.    ........................    8
            2.9.     ...........................    9

            3.   .....................................    9
            3.1.   ......................................    9
            3.1.1.    ............................    9
            3.1.2.    ........................   10
            3.1.3.  - ...........................   10
            3.1.4.    .......................   11
            3.2.    ...........................   12
            3.3.      ..............   13
            3.3.1.    .............................   13
            3.3.2.     ......................   13
            3.3.3.     ......................   14
            3.3.4.    ......................   15
            3.4.   ....................................   18
            3.4.1.    .........................   18
            3.4.2.   ...................................   19
            3.5.     ...............................   20
            3.5.1.   ..........................   21
            3.5.2.    .....................   22

            4.   .......................................   23
            4.1.   ...................................   23
            4.2.      ................   23
            4.2.1.     ...........................   23
            4.2.2.     .........................   24
            4.2.3.    .........................   25
            4.3.      ....   26
            4.3.1.    ..........................   26
            4.3.2.     ...........   27
            4.4.     ............   27
            4.4.1.     ....................   27
            4.4.2.     ................   27
            4.4.3.      .............   27


                                    - 61 -

            4.5.     ...........................   28
            4.5.1.    ...........................   28
            4.5.2.     ..................   28
            4.5.3.    .......................   30
            4.5.4.    .......................   31
            4.5.5.    .....................   31
            4.5.6.    ........................   32
            4.5.7.    ...........................   32
            4.5.8.    .............................   33
            4.5.9.         (-
                    ) ..................................   33
            4.6.     ......................   34
            4.6.1.       .....   35
            4.6.2.     ...............   35
            4.6.3.    ........................   37
            4.6.4.    ........................   37
            4.6.5.    ..................   37
            4.6.6.    .....................   37
            4.7.      ............   38
            4.7.1.    ...............   38
            4.7.2.     ..................   39
            4.8.          -
                   .......................................   39
            4.8.1.     ..................   42
            4.8.2.          -
                     .....................................   43
            4.9.    .......................   43
            4.9.1.    .......................   44
            4.9.2.    ...................   44
            4.9.3.    .........................   45
            4.9.4.      ....................   45
            4.9.5.   ,    ...........   46
            4.9.6.      .....   47
            4.10.   ......................   48
            4.10.1.      .........   48
            4.10.2.    ...................   49
            4.11.     .............   50
            4.11.1.     ...................   50
            4.11.2.    ...............   50
            4.11.3.     ..........   51
            4.12.    .................   52
            4.12.1.  : lp ........................   52
            4.12.2.    lp ..............   53
            4.12.3.     : cancel ....   54
            4.12.4.         :
                    lpstat ...................................   54
            4.13.     .............   56
            4.13.1.   ...........................   56
            4.13.2.   ..........................   56
            4.13.3.     ...........   57
            4.14.       -
                   ......................................   57
            4.14.1.      ..................   58


                                    - 62 -

            4.14.2.    ....................   58
            4.15.        
                   ....................................   58
            4.16.      -
                   ......................................   59
            4.17.  ................................   59







                                    - 63 -




Last-modified: Tue, 30 Jun 1998 04:46:06 GMT
: