.  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 , , , .. .