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