home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V7 / usr / lib / learn / files.a < prev    next >
Unix Archive - Old  |  1979-01-13  |  37.8 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was processed as: Unix Archive - Old (archive/unixArchiveOld).
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Unix Archive - Old (archive/unixArchiveOld) magic Unsupported
1% dexvert System V 64-bit library (executable/systemV64BitLibrary) ext Unsupported
1% dexvert COFF Library (other/coffLibrary) ext Unsupported
100% file old 16-bit-int little-endian archive default
99% file Microsoft x.out archive default (weak)
98% file data default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 65 ff 4c 30 00 00 00 00 | 00 00 00 00 00 00 00 00 |e.L0....|........|
|00000010| cd 10 de 5e 09 01 b4 81 | 00 00 0e 00 23 6e 65 78 |...^....|....#nex|
|00000020| 74 0a 30 2e 31 61 20 31 | 30 0a 4c 30 2e 31 61 00 |t.0.1a 1|0.L0.1a.|
|00000030| 00 00 00 00 00 00 00 00 | ec 10 3b ee 09 01 b4 81 |........|..;.....|
|00000040| 00 00 84 03 23 70 72 69 | 6e 74 0a 54 68 69 73 20 |....#pri|nt.This |
|00000050| 63 6f 75 72 73 65 20 77 | 69 6c 6c 20 68 65 6c 70 |course w|ill help|
|00000060| 20 79 6f 75 20 6c 65 61 | 72 6e 20 61 62 6f 75 74 | you lea|rn about|
|00000070| 20 62 61 73 69 63 20 66 | 69 6c 65 0a 68 61 6e 64 | basic f|ile.hand|
|00000080| 6c 69 6e 67 20 63 6f 6d | 6d 61 6e 64 73 2e 20 20 |ling com|mands. |
|00000090| 59 6f 75 20 73 68 6f 75 | 6c 64 20 66 69 72 73 74 |You shou|ld first|
|000000a0| 20 75 6e 64 65 72 73 74 | 61 6e 64 0a 74 68 65 20 | underst|and.the |
|000000b0| 73 70 65 63 69 61 6c 20 | 63 68 61 72 61 63 74 65 |special |characte|
|000000c0| 72 73 20 23 20 61 6e 64 | 20 40 3a 20 0a 20 20 23 |rs # and| @: . #|
|000000d0| 20 63 61 6e 63 65 6c 73 | 20 74 68 65 20 70 72 65 | cancels| the pre|
|000000e0| 76 69 6f 75 73 20 63 68 | 61 72 61 63 74 65 72 20 |vious ch|aracter |
|000000f0| 74 79 70 65 64 3b 0a 20 | 20 40 20 63 61 6e 63 65 |typed;. | @ cance|
|00000100| 6c 73 20 74 68 65 20 6c | 69 6e 65 20 62 65 69 6e |ls the l|ine bein|
|00000110| 67 20 74 79 70 65 64 2e | 0a 49 66 20 79 6f 75 20 |g typed.|.If you |
|00000120| 6d 61 6b 65 20 61 20 74 | 79 70 69 6e 67 20 6d 69 |make a t|yping mi|
|00000130| 73 74 61 6b 65 2c 20 79 | 6f 75 20 63 61 6e 20 75 |stake, y|ou can u|
|00000140| 73 65 20 74 68 65 73 65 | 20 63 68 61 72 61 63 74 |se these| charact|
|00000150| 65 72 73 20 74 6f 0a 63 | 6f 72 72 65 63 74 20 69 |ers to.c|orrect i|
|00000160| 74 20 62 65 66 6f 72 65 | 20 79 6f 75 20 66 69 6e |t before| you fin|
|00000170| 69 73 68 20 74 68 65 20 | 6c 69 6e 65 20 61 6e 64 |ish the |line and|
|00000180| 20 74 68 65 20 63 6f 6d | 70 75 74 65 72 20 77 6f | the com|puter wo|
|00000190| 6e 27 74 0a 65 76 65 72 | 20 6b 6e 6f 77 20 61 62 |n't.ever| know ab|
|000001a0| 6f 75 74 20 69 74 2e 20 | 20 46 6f 72 20 65 78 61 |out it. | For exa|
|000001b0| 6d 70 6c 65 2c 20 77 68 | 61 74 20 77 69 6c 6c 20 |mple, wh|at will |
|000001c0| 74 68 65 0a 63 6f 6d 70 | 75 74 65 72 20 72 65 61 |the.comp|uter rea|
|000001d0| 6c 6c 79 20 72 65 63 65 | 69 76 65 20 69 66 20 79 |lly rece|ive if y|
|000001e0| 6f 75 20 74 79 70 65 0a | 0a 73 74 23 68 65 40 0a |ou type.|.st#he@.|
|000001f0| 74 68 66 23 65 0a 0a 61 | 74 20 69 74 3f 20 20 52 |thf#e..a|t it? R|
|00000200| 65 70 6c 79 20 22 61 6e | 73 77 65 72 20 57 4f 52 |eply "an|swer WOR|
|00000210| 44 22 20 77 68 65 72 65 | 20 57 4f 52 44 20 69 73 |D" where| WORD is|
|00000220| 20 74 68 65 20 77 6f 72 | 64 0a 61 73 20 69 74 20 | the wor|d.as it |
|00000230| 77 69 6c 6c 20 62 65 20 | 69 6e 74 65 72 70 72 65 |will be |interpre|
|00000240| 74 65 64 2e 20 20 46 6f | 72 20 65 78 61 6d 70 6c |ted. Fo|r exampl|
|00000250| 65 2c 20 69 66 0a 79 6f | 75 20 74 68 69 6e 6b 20 |e, if.yo|u think |
|00000260| 69 74 20 77 69 6c 6c 20 | 67 65 74 20 27 64 6f 67 |it will |get 'dog|
|00000270| 27 2c 20 74 79 70 65 0a | 0a 61 6e 73 77 65 72 20 |', type.|.answer |
|00000280| 64 6f 67 0a 0a 49 66 20 | 79 6f 75 20 74 68 69 6e |dog..If |you thin|
|00000290| 6b 20 69 74 20 77 69 6c | 6c 20 72 65 63 65 69 76 |k it wil|l receiv|
|000002a0| 65 20 74 68 65 20 77 6f | 72 64 20 22 62 61 72 6b |e the wo|rd "bark|
|000002b0| 22 2c 20 74 79 70 65 0a | 0a 61 6e 73 77 65 72 20 |", type.|.answer |
|000002c0| 62 61 72 6b 0a 0a 44 6f | 6e 27 74 20 66 6f 72 67 |bark..Do|n't forg|
|000002d0| 65 74 20 74 6f 20 6c 65 | 61 76 65 20 61 20 73 70 |et to le|ave a sp|
|000002e0| 61 63 65 20 62 65 74 77 | 65 65 6e 20 22 61 6e 73 |ace betw|een "ans|
|000002f0| 77 65 72 22 20 61 6e 64 | 20 74 68 65 20 77 6f 72 |wer" and| the wor|
|00000300| 64 0a 61 6e 64 20 74 6f | 20 68 69 74 20 52 45 54 |d.and to| hit RET|
|00000310| 55 52 4e 20 61 74 20 74 | 68 65 20 65 6e 64 20 6f |URN at t|he end o|
|00000320| 66 20 74 68 65 20 6c 69 | 6e 65 2e 0a 44 6f 6e 27 |f the li|ne..Don'|
|00000330| 74 20 75 73 65 20 61 6e | 79 20 71 75 6f 74 61 74 |t use an|y quotat|
|00000340| 69 6f 6e 20 6d 61 72 6b | 73 20 69 6e 20 79 6f 75 |ion mark|s in you|
|00000350| 72 20 61 6e 73 77 65 72 | 2e 0a 23 63 6f 70 79 69 |r answer|..#copyi|
|00000360| 6e 0a 23 75 73 65 72 0a | 23 75 6e 63 6f 70 79 69 |n.#user.|#uncopyi|
|00000370| 6e 0a 23 6d 61 74 63 68 | 20 74 68 65 0a 23 62 61 |n.#match| the.#ba|
|00000380| 64 20 61 6e 73 77 65 72 | 74 68 65 0a 4c 65 61 76 |d answer|the.Leav|
|00000390| 65 20 61 20 73 70 61 63 | 65 20 62 65 74 77 65 65 |e a spac|e betwee|
|000003a0| 6e 20 22 61 6e 73 77 65 | 72 22 20 61 6e 64 20 22 |n "answe|r" and "|
|000003b0| 74 68 65 22 2e 0a 23 6c | 6f 67 0a 23 6e 65 78 74 |the"..#l|og.#next|
|000003c0| 0a 30 2e 31 62 20 35 0a | 4c 30 2e 31 62 00 00 00 |.0.1b 5.|L0.1b...|
|000003d0| 00 00 00 00 00 00 e9 10 | 58 a9 09 01 b4 81 00 00 |........|X.......|
|000003e0| 45 03 23 70 72 69 6e 74 | 0a 59 6f 75 20 73 68 6f |E.#print|.You sho|
|000003f0| 75 6c 64 20 61 6c 73 6f | 20 75 6e 64 65 72 73 74 |uld also| underst|
|00000400| 61 6e 64 20 61 20 66 65 | 77 20 73 69 6d 70 6c 65 |and a fe|w simple|
|00000410| 20 63 6f 6d 6d 61 6e 64 | 73 2e 0a 57 68 65 6e 20 | command|s..When |
|00000420| 55 4e 49 58 20 74 79 70 | 65 73 20 61 20 22 24 22 |UNIX typ|es a "$"|
|00000430| 20 61 74 20 79 6f 75 2c | 20 79 6f 75 20 63 61 6e | at you,| you can|
|00000440| 20 74 79 70 65 20 61 20 | 63 6f 6d 6d 61 6e 64 2e | type a |command.|
|00000450| 0a 46 6f 72 20 65 78 61 | 6d 70 6c 65 2c 20 69 66 |.For exa|mple, if|
|00000460| 20 79 6f 75 20 74 79 70 | 65 20 22 64 61 74 65 22 | you typ|e "date"|
|00000470| 20 74 68 65 20 63 6f 6d | 70 75 74 65 72 20 77 69 | the com|puter wi|
|00000480| 6c 6c 20 74 65 6c 6c 0a | 79 6f 75 20 74 68 65 20 |ll tell.|you the |
|00000490| 63 75 72 72 65 6e 74 20 | 64 61 74 65 20 61 6e 64 |current |date and|
|000004a0| 20 74 69 6d 65 2e 20 49 | 66 20 79 6f 75 20 73 65 | time. I|f you se|
|000004b0| 65 20 22 24 22 20 61 6e | 64 20 74 79 70 65 20 22 |e "$" an|d type "|
|000004c0| 77 68 6f 22 2c 0a 55 4e | 49 58 20 77 69 6c 6c 20 |who",.UN|IX will |
|000004d0| 74 65 6c 6c 20 79 6f 75 | 20 77 68 6f 20 69 73 20 |tell you| who is |
|000004e0| 6c 6f 67 67 65 64 20 6f | 6e 20 61 74 20 70 72 65 |logged o|n at pre|
|000004f0| 73 65 6e 74 2e 20 20 54 | 68 65 72 65 20 61 72 65 |sent. T|here are|
|00000500| 0a 6d 61 6e 79 20 6f 74 | 68 65 72 20 63 6f 6d 6d |.many ot|her comm|
|00000510| 61 6e 64 73 2c 20 74 6f | 6f 2e 20 20 59 6f 75 20 |ands, to|o. You |
|00000520| 6d 75 73 74 20 74 79 70 | 65 20 61 20 52 45 54 55 |must typ|e a RETU|
|00000530| 52 4e 20 61 74 20 74 68 | 65 0a 65 6e 64 20 6f 66 |RN at th|e.end of|
|00000540| 20 65 61 63 68 20 63 6f | 6d 6d 61 6e 64 20 6c 69 | each co|mmand li|
|00000550| 6e 65 2e 0a 0a 54 72 79 | 20 74 68 65 20 22 64 61 |ne...Try| the "da|
|00000560| 74 65 22 20 63 6f 6d 6d | 61 6e 64 20 6e 6f 77 3a |te" comm|and now:|
|00000570| 20 66 69 6e 64 20 6f 75 | 74 20 77 68 61 74 0a 64 | find ou|t what.d|
|00000580| 61 74 65 20 69 74 20 69 | 73 2c 20 61 6e 64 20 61 |ate it i|s, and a|
|00000590| 66 74 65 72 20 74 68 65 | 20 63 6f 6d 70 75 74 65 |fter the| compute|
|000005a0| 72 20 68 61 73 20 72 65 | 73 70 6f 6e 64 65 64 2c |r has re|sponded,|
|000005b0| 20 74 79 70 65 20 22 72 | 65 61 64 79 22 2e 0a 41 | type "r|eady"..A|
|000005c0| 6e 64 20 64 6f 6e 27 74 | 20 66 6f 72 67 65 74 20 |nd don't| forget |
|000005d0| 74 68 65 20 52 45 54 55 | 52 4e 21 0a 23 63 6f 70 |the RETU|RN!.#cop|
|000005e0| 79 69 6e 0a 23 75 73 65 | 72 0a 23 75 6e 63 6f 70 |yin.#use|r.#uncop|
|000005f0| 79 69 6e 0a 67 72 65 70 | 20 64 61 74 65 20 2e 63 |yin.grep| date .c|
|00000600| 6f 70 79 20 3e 2f 64 65 | 76 2f 6e 75 6c 6c 0a 23 |opy >/de|v/null.#|
|00000610| 62 61 64 20 64 61 79 0a | 59 6f 75 20 77 65 72 65 |bad day.|You were|
|00000620| 20 73 75 70 70 6f 73 65 | 64 20 74 6f 20 74 79 70 | suppose|d to typ|
|00000630| 65 20 22 64 61 74 65 22 | 20 28 77 69 74 68 6f 75 |e "date"| (withou|
|00000640| 74 20 71 75 6f 74 65 73 | 29 2e 0a 54 68 65 20 63 |t quotes|)..The c|
|00000650| 6f 6d 70 75 74 65 72 20 | 69 73 20 76 65 72 79 20 |omputer |is very |
|00000660| 69 6e 74 6f 6c 65 72 61 | 6e 74 20 6f 66 20 73 70 |intolera|nt of sp|
|00000670| 65 6c 6c 69 6e 67 20 65 | 72 72 6f 72 73 2e 0a 54 |elling e|rrors..T|
|00000680| 72 79 20 61 67 61 69 6e | 2e 0a 23 62 61 64 20 22 |ry again|..#bad "|
|00000690| 64 61 74 65 22 0a 44 6f | 6e 27 74 20 74 79 70 65 |date".Do|n't type|
|000006a0| 20 74 68 6f 73 65 20 71 | 75 6f 74 65 20 6d 61 72 | those q|uote mar|
|000006b0| 6b 73 2e 20 54 72 79 20 | 61 67 61 69 6e 2e 0a 23 |ks. Try |again..#|
|000006c0| 62 61 64 20 74 69 6d 65 | 0a 54 68 65 20 74 69 6d |bad time|.The tim|
|000006d0| 65 20 63 6f 6d 6d 61 6e | 64 20 64 6f 65 73 20 6e |e comman|d does n|
|000006e0| 6f 74 20 74 65 6c 6c 20 | 79 6f 75 20 74 68 65 20 |ot tell |you the |
|000006f0| 77 61 6c 6c 2d 63 6c 6f | 63 6b 20 74 69 6d 65 2e |wall-clo|ck time.|
|00000700| 0a 54 72 79 20 64 61 74 | 65 20 6e 65 78 74 20 74 |.Try dat|e next t|
|00000710| 69 6d 65 2e 0a 23 6c 6f | 67 0a 23 6e 65 78 74 0a |ime..#lo|g.#next.|
|00000720| 30 2e 31 63 20 35 0a 70 | 4c 30 2e 31 63 00 00 00 |0.1c 5.p|L0.1c...|
|00000730| 00 00 00 00 00 00 e9 10 | ff 5b 09 01 b4 81 00 00 |........|.[......|
|00000740| 5b 02 23 70 72 69 6e 74 | 0a 54 68 65 20 63 6f 6d |[.#print|.The com|
|00000750| 70 75 74 65 72 20 6b 65 | 65 70 73 20 74 72 61 63 |puter ke|eps trac|
|00000760| 6b 20 6f 66 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |k of inf|ormation|
|00000770| 20 69 6e 20 22 66 69 6c | 65 73 2e 22 0a 41 20 66 | in "fil|es.".A f|
|00000780| 69 6c 65 20 6d 69 67 68 | 74 20 63 6f 6e 74 61 69 |ile migh|t contai|
|00000790| 6e 20 61 20 6c 65 74 74 | 65 72 20 74 6f 20 61 20 |n a lett|er to a |
|000007a0| 66 72 69 65 6e 64 2c 0a | 6f 72 20 61 20 6d 65 6d |friend,.|or a mem|
|000007b0| 6f 20 28 6f 72 20 70 61 | 72 74 20 6f 66 20 69 74 |o (or pa|rt of it|
|000007c0| 29 20 74 68 61 74 20 79 | 6f 75 20 61 72 65 20 74 |) that y|ou are t|
|000007d0| 79 70 69 6e 67 2c 0a 6f | 72 20 61 6e 79 20 6e 75 |yping,.o|r any nu|
|000007e0| 6d 62 65 72 20 6f 66 20 | 6f 74 68 65 72 20 74 68 |mber of |other th|
|000007f0| 69 6e 67 73 2e 0a 59 6f | 75 20 63 61 6e 20 6c 69 |ings..Yo|u can li|
|00000800| 73 74 20 74 68 65 20 6e | 61 6d 65 73 20 6f 66 20 |st the n|ames of |
|00000810| 79 6f 75 72 20 66 69 6c | 65 73 0a 62 79 20 74 79 |your fil|es.by ty|
|00000820| 70 69 6e 67 20 74 68 65 | 20 63 6f 6d 6d 61 6e 64 |ping the| command|
|00000830| 20 22 6c 73 22 2e 0a 54 | 72 79 20 22 6c 73 22 20 | "ls"..T|ry "ls" |
|00000840| 6e 6f 77 3b 20 74 68 65 | 6e 20 74 79 70 65 20 22 |now; the|n type "|
|00000850| 72 65 61 64 79 22 2e 0a | 52 65 6d 65 6d 62 65 72 |ready"..|Remember|
|00000860| 20 74 68 61 74 20 65 61 | 63 68 20 63 6f 6d 6d 61 | that ea|ch comma|
|00000870| 6e 64 20 6d 75 73 74 20 | 67 6f 20 6f 6e 20 61 20 |nd must |go on a |
|00000880| 73 65 70 61 72 61 74 65 | 20 6c 69 6e 65 0a 61 6e |separate| line.an|
|00000890| 64 20 65 61 63 68 20 6c | 69 6e 65 20 6d 75 73 74 |d each l|ine must|
|000008a0| 20 62 65 20 65 6e 64 65 | 64 20 77 69 74 68 20 52 | be ende|d with R|
|000008b0| 45 54 55 52 4e 2e 0a 23 | 63 72 65 61 74 65 20 6c |ETURN..#|create l|
|000008c0| 65 74 74 65 72 0a 44 65 | 61 72 20 4a 6f 68 6e 3a |etter.De|ar John:|
|000008d0| 0a 20 0a 49 27 6d 20 74 | 65 72 72 69 62 6c 79 20 |. .I'm t|erribly |
|000008e0| 73 6f 72 72 79 2e 2e 2e | 0a 23 63 72 65 61 74 65 |sorry...|.#create|
|000008f0| 20 6d 65 6d 6f 0a 54 68 | 69 73 20 69 73 20 61 20 | memo.Th|is is a |
|00000900| 6d 65 6d 6f 2e 0a 23 63 | 72 65 61 74 65 20 6d 65 |memo..#c|reate me|
|00000910| 6d 6f 31 0a 41 6e 6f 74 | 68 65 72 20 6d 65 6d 6f |mo1.Anot|her memo|
|00000920| 2e 0a 23 63 6f 70 79 69 | 6e 0a 23 75 73 65 72 0a |..#copyi|n.#user.|
|00000930| 23 75 6e 63 6f 70 79 69 | 6e 0a 67 72 65 70 20 27 |#uncopyi|n.grep '|
|00000940| 5e 6c 73 27 20 2e 63 6f | 70 79 20 3e 2f 64 65 76 |^ls' .co|py >/dev|
|00000950| 2f 6e 75 6c 6c 0a 23 62 | 61 64 20 22 6c 73 22 0a |/null.#b|ad "ls".|
|00000960| 44 6f 6e 27 74 20 74 79 | 70 65 20 74 68 65 20 71 |Don't ty|pe the q|
|00000970| 75 6f 74 65 73 2c 20 70 | 6c 65 61 73 65 2e 20 54 |uotes, p|lease. T|
|00000980| 72 79 20 61 67 61 69 6e | 2e 0a 23 6c 6f 67 0a 23 |ry again|..#log.#|
|00000990| 6e 65 78 74 0a 30 2e 31 | 64 20 31 30 0a 20 4c 30 |next.0.1|d 10. L0|
|000009a0| 2e 31 64 00 00 00 00 00 | 00 00 00 00 e9 10 cf 5c |.1d.....|.......\|
|000009b0| 09 03 b4 81 00 00 7b 02 | 23 70 72 69 6e 74 0a 46 |......{.|#print.F|
|000009c0| 69 6c 65 20 6e 61 6d 65 | 73 20 61 72 65 20 65 73 |ile name|s are es|
|000009d0| 73 65 6e 74 69 61 6c 6c | 79 20 61 72 62 69 74 72 |sentiall|y arbitr|
|000009e0| 61 72 79 2c 0a 61 6c 74 | 68 6f 75 67 68 20 75 73 |ary,.alt|hough us|
|000009f0| 75 61 6c 6c 79 20 6f 6e | 65 20 6e 61 6d 65 73 20 |ually on|e names |
|00000a00| 66 69 6c 65 73 20 73 65 | 6e 73 69 62 6c 79 3a 0a |files se|nsibly:.|
|00000a10| 74 68 65 20 66 69 6c 65 | 73 20 74 68 61 74 20 6d |the file|s that m|
|00000a20| 61 6b 65 20 75 70 20 61 | 20 6d 65 6d 6f 0a 6d 69 |ake up a| memo.mi|
|00000a30| 67 68 74 20 62 65 20 63 | 61 6c 6c 65 64 20 22 6d |ght be c|alled "m|
|00000a40| 65 6d 6f 31 22 2c 20 22 | 6d 65 6d 6f 32 22 2c 20 |emo1", "|memo2", |
|00000a50| 65 74 63 2e 0a 0a 54 68 | 65 20 63 6f 6e 74 65 6e |etc...Th|e conten|
|00000a60| 74 73 20 6f 66 20 61 20 | 66 69 6c 65 20 61 72 65 |ts of a |file are|
|00000a70| 20 61 6c 73 6f 20 65 6e | 74 69 72 65 6c 79 20 75 | also en|tirely u|
|00000a80| 70 20 74 6f 20 79 6f 75 | 3a 0a 66 6f 72 20 65 78 |p to you|:.for ex|
|00000a90| 61 6d 70 6c 65 2c 20 61 | 20 66 69 6c 65 20 6e 61 |ample, a| file na|
|00000aa0| 6d 65 64 20 22 6d 65 6d | 6f 22 20 63 6f 75 6c 64 |med "mem|o" could|
|00000ab0| 20 63 6f 6e 74 61 69 6e | 0a 0a 20 20 20 41 6e 61 | contain|.. Ana|
|00000ac0| 6c 79 73 69 73 20 6f 66 | 20 49 72 72 65 67 75 6c |lysis of| Irregul|
|00000ad0| 61 72 20 53 74 61 74 69 | 73 74 69 63 73 0a 20 20 |ar Stati|stics. |
|00000ae0| 20 20 20 20 20 20 4a 6f | 68 6e 20 42 2e 20 50 65 | Jo|hn B. Pe|
|00000af0| 6e 63 69 6c 70 75 73 68 | 65 72 0a 0a 20 20 42 65 |ncilpush|er.. Be|
|00000b00| 6c 6c 20 4c 61 62 6f 72 | 61 74 6f 72 69 65 73 2c |ll Labor|atories,|
|00000b10| 20 4d 75 72 72 61 79 20 | 48 69 6c 6c 2c 20 4e 4a | Murray |Hill, NJ|
|00000b20| 0a 20 20 20 20 2e 2e 2e | 2e 0a 0a 54 6f 20 67 65 |. ...|...To ge|
|00000b30| 74 20 61 74 20 74 68 65 | 20 69 6e 66 6f 72 6d 61 |t at the| informa|
|00000b40| 74 69 6f 6e 20 69 6e 20 | 61 20 66 69 6c 65 2c 0a |tion in |a file,.|
|00000b50| 79 6f 75 20 68 61 76 65 | 20 74 6f 20 75 73 65 20 |you have| to use |
|00000b60| 74 68 65 20 66 69 6c 65 | 20 6e 61 6d 65 2c 0a 77 |the file| name,.w|
|00000b70| 68 69 63 68 20 69 6e 20 | 74 68 69 73 20 63 61 73 |hich in |this cas|
|00000b80| 65 20 69 73 20 22 6d 65 | 6d 6f 22 2e 20 0a 0a 49 |e is "me|mo". ..I|
|00000b90| 73 20 74 68 65 72 65 20 | 61 20 64 69 66 66 65 72 |s there |a differ|
|00000ba0| 65 6e 63 65 20 62 65 74 | 77 65 65 6e 20 74 68 65 |ence bet|ween the|
|00000bb0| 20 6e 61 6d 65 20 6f 66 | 20 61 20 66 69 6c 65 0a | name of| a file.|
|00000bc0| 61 6e 64 20 74 68 65 20 | 63 6f 6e 74 65 6e 74 73 |and the |contents|
|00000bd0| 20 6f 66 20 61 20 66 69 | 6c 65 3f 0a 54 79 70 65 | of a fi|le?.Type|
|00000be0| 20 22 79 65 73 22 20 6f | 72 20 22 6e 6f 22 2e 0a | "yes" o|r "no"..|
|00000bf0| 23 63 6f 70 79 69 6e 0a | 23 75 73 65 72 0a 23 75 |#copyin.|#user.#u|
|00000c00| 6e 63 6f 70 79 69 6e 0a | 23 6d 61 74 63 68 20 79 |ncopyin.|#match y|
|00000c10| 65 73 0a 23 6c 6f 67 0a | 23 6e 65 78 74 0a 31 2e |es.#log.|#next.1.|
|00000c20| 31 61 20 20 20 20 31 30 | 0a 31 2e 32 61 20 20 20 |1a 10|.1.2a |
|00000c30| 20 35 0a 20 4c 31 2e 31 | 61 00 00 00 00 00 00 00 | 5. L1.1|a.......|
|00000c40| 00 00 e9 10 68 a9 09 01 | b4 81 00 00 d6 00 23 70 |....h...|......#p|
|00000c50| 72 69 6e 74 0a 54 68 65 | 20 22 6c 73 22 20 63 6f |rint.The| "ls" co|
|00000c60| 6d 6d 61 6e 64 20 77 69 | 6c 6c 20 6c 69 73 74 20 |mmand wi|ll list |
|00000c70| 74 68 65 20 6e 61 6d 65 | 73 20 6f 66 20 74 68 65 |the name|s of the|
|00000c80| 20 66 69 6c 65 73 0a 69 | 6e 20 79 6f 75 72 20 64 | files.i|n your d|
|00000c90| 69 72 65 63 74 6f 72 79 | 2e 20 20 49 73 20 74 68 |irectory|. Is th|
|00000ca0| 65 72 65 20 61 20 66 69 | 6c 65 20 6e 61 6d 65 64 |ere a fi|le named|
|00000cb0| 20 22 6a 75 6e 6b 22 0a | 70 72 65 73 65 6e 74 3f | "junk".|present?|
|00000cc0| 20 20 46 69 6e 64 20 6f | 75 74 20 61 6e 64 20 74 | Find o|ut and t|
|00000cd0| 68 65 6e 20 74 79 70 65 | 20 22 79 65 73 22 20 6f |hen type| "yes" o|
|00000ce0| 72 20 22 6e 6f 22 2e 0a | 23 63 6f 70 79 69 6e 0a |r "no"..|#copyin.|
|00000cf0| 23 75 73 65 72 0a 23 75 | 6e 63 6f 70 79 69 6e 0a |#user.#u|ncopyin.|
|00000d00| 23 6d 61 74 63 68 20 6e | 6f 0a 23 6c 6f 67 0a 23 |#match n|o.#log.#|
|00000d10| 6e 65 78 74 0a 32 2e 31 | 61 20 31 30 0a 32 2e 32 |next.2.1|a 10.2.2|
|00000d20| 61 20 35 0a 4c 31 2e 32 | 61 00 00 00 00 00 00 00 |a 5.L1.2|a.......|
|00000d30| 00 00 e9 10 9c a9 09 01 | b4 81 00 00 28 01 23 70 |........|....(.#p|
|00000d40| 72 69 6e 74 0a 55 73 65 | 20 74 68 65 20 22 6c 73 |rint.Use| the "ls|
|00000d50| 22 20 63 6f 6d 6d 61 6e | 64 20 74 6f 20 64 65 74 |" comman|d to det|
|00000d60| 65 72 6d 69 6e 65 20 69 | 66 20 74 68 65 72 65 20 |ermine i|f there |
|00000d70| 69 73 20 61 20 66 69 6c | 65 0a 6e 61 6d 65 64 20 |is a fil|e.named |
|00000d80| 66 6f 72 20 61 20 73 74 | 61 74 65 20 69 6e 20 74 |for a st|ate in t|
|00000d90| 68 65 20 63 75 72 72 65 | 6e 74 20 64 69 72 65 63 |he curre|nt direc|
|00000da0| 74 6f 72 79 2e 0a 46 69 | 6e 64 20 6f 75 74 20 61 |tory..Fi|nd out a|
|00000db0| 6e 64 20 74 79 70 65 20 | 22 79 65 73 22 20 6f 72 |nd type |"yes" or|
|00000dc0| 20 22 6e 6f 22 2e 0a 28 | 44 6f 6e 27 74 20 75 73 | "no"..(|Don't us|
|00000dd0| 65 20 74 68 65 20 6c 69 | 73 74 20 79 6f 75 20 67 |e the li|st you g|
|00000de0| 6f 74 20 65 61 72 6c 69 | 65 72 20 2d 20 49 27 76 |ot earli|er - I'v|
|00000df0| 65 20 63 68 61 6e 67 65 | 64 20 74 68 69 6e 67 73 |e change|d things|
|00000e00| 2e 29 0a 23 63 72 65 61 | 74 65 20 74 65 78 61 73 |.).#crea|te texas|
|00000e10| 0a 64 61 6c 6c 61 73 2c | 20 68 6f 75 73 74 6f 6e |.dallas,| houston|
|00000e20| 2c 20 65 74 63 2e 0a 23 | 63 6f 70 79 69 6e 0a 23 |, etc..#|copyin.#|
|00000e30| 75 73 65 72 0a 23 75 6e | 63 6f 70 79 69 6e 0a 23 |user.#un|copyin.#|
|00000e40| 6d 61 74 63 68 20 79 65 | 73 0a 23 6c 6f 67 0a 23 |match ye|s.#log.#|
|00000e50| 6e 65 78 74 0a 32 2e 31 | 61 20 20 31 30 0a 32 2e |next.2.1|a 10.2.|
|00000e60| 32 61 20 20 35 0a 4c 31 | 2e 32 62 00 00 00 00 00 |2a 5.L1|.2b.....|
|00000e70| 00 00 00 00 f0 10 04 44 | 09 01 b4 81 00 00 1b 02 |.......D|........|
|00000e80| 23 70 72 69 6e 74 0a 59 | 6f 75 20 63 61 6e 20 75 |#print.Y|ou can u|
|00000e90| 73 65 20 74 68 65 20 22 | 6c 73 22 20 63 6f 6d 6d |se the "|ls" comm|
|00000ea0| 61 6e 64 20 74 6f 20 66 | 69 6e 64 20 6f 75 74 20 |and to f|ind out |
|00000eb0| 68 6f 77 0a 6d 61 6e 79 | 20 66 69 6c 65 73 20 79 |how.many| files y|
|00000ec0| 6f 75 20 68 61 76 65 20 | 69 6e 20 79 6f 75 72 20 |ou have |in your |
|00000ed0| 64 69 72 65 63 74 6f 72 | 79 2e 0a 48 6f 77 20 6d |director|y..How m|
|00000ee0| 61 6e 79 20 66 69 6c 65 | 73 20 61 72 65 20 74 68 |any file|s are th|
|00000ef0| 65 72 65 20 69 6e 20 74 | 68 65 20 63 75 72 72 65 |ere in t|he curre|
|00000f00| 6e 74 0a 64 69 72 65 63 | 74 6f 72 79 20 6e 6f 77 |nt.direc|tory now|
|00000f10| 3f 20 20 4d 61 6b 65 20 | 61 6e 6f 74 68 65 72 20 |? Make |another |
|00000f20| 6c 69 73 74 20 2d 20 74 | 68 65 20 6c 69 73 74 20 |list - t|he list |
|00000f30| 6f 66 20 66 69 6c 65 73 | 0a 74 68 61 74 20 79 6f |of files|.that yo|
|00000f40| 75 20 6d 61 64 65 20 62 | 65 66 6f 72 65 20 69 73 |u made b|efore is|
|00000f50| 20 6e 6f 20 6c 6f 6e 67 | 65 72 20 72 69 67 68 74 | no long|er right|
|00000f60| 20 62 65 63 61 75 73 65 | 20 49 20 61 64 64 65 64 | because| I added|
|00000f70| 0a 73 6f 6d 65 20 66 69 | 6c 65 73 20 74 6f 20 74 |.some fi|les to t|
|00000f80| 68 65 20 64 69 72 65 63 | 74 6f 72 79 2e 20 20 57 |he direc|tory. W|
|00000f90| 68 65 6e 20 79 6f 75 20 | 66 69 6e 64 20 6f 75 74 |hen you |find out|
|00000fa0| 0a 68 6f 77 20 6d 61 6e | 79 20 66 69 6c 65 73 20 |.how man|y files |
|00000fb0| 74 68 65 72 65 20 61 72 | 65 20 69 6e 20 74 68 69 |there ar|e in thi|
|00000fc0| 73 20 64 69 72 65 63 74 | 6f 72 79 2c 20 74 79 70 |s direct|ory, typ|
|00000fd0| 65 0a 22 61 6e 73 77 65 | 72 20 4e 22 20 77 68 65 |e."answe|r N" whe|
|00000fe0| 72 65 20 4e 20 69 73 20 | 74 68 65 20 6e 75 6d 62 |re N is |the numb|
|00000ff0| 65 72 20 6f 66 20 66 69 | 6c 65 73 2e 0a 23 63 72 |er of fi|les..#cr|
|00001000| 65 61 74 65 20 61 31 0a | 66 69 6c 65 20 61 31 0a |eate a1.|file a1.|
|00001010| 23 63 72 65 61 74 65 20 | 61 32 0a 66 69 6c 65 20 |#create |a2.file |
|00001020| 61 32 0a 23 63 72 65 61 | 74 65 20 58 31 0a 66 69 |a2.#crea|te X1.fi|
|00001030| 6c 65 20 61 31 0a 23 63 | 6f 70 79 69 6e 0a 23 75 |le a1.#c|opyin.#u|
|00001040| 73 65 72 0a 23 75 6e 63 | 6f 70 79 69 6e 0a 6c 73 |ser.#unc|opyin.ls|
|00001050| 20 7c 20 25 73 2f 2e 2e | 2f 6c 63 6f 75 6e 74 20 | | %s/..|/lcount |
|00001060| 3e 58 31 0a 74 61 69 6c | 20 2d 31 20 2e 63 6f 70 |>X1.tail| -1 .cop|
|00001070| 79 20 3e 58 32 0a 23 63 | 6d 70 20 58 31 20 58 32 |y >X2.#c|mp X1 X2|
|00001080| 0a 23 6c 6f 67 0a 23 6e | 65 78 74 0a 32 2e 31 61 |.#log.#n|ext.2.1a|
|00001090| 20 31 30 0a 32 2e 32 61 | 20 35 0a 20 4c 31 30 2e | 10.2.2a| 5. L10.|
|000010a0| 31 61 00 00 00 00 00 00 | 00 00 e9 10 56 af 09 01 |1a......|....V...|
|000010b0| b4 81 00 00 24 02 23 70 | 72 69 6e 74 0a 57 68 65 |....$.#p|rint.Whe|
|000010c0| 6e 20 79 6f 75 20 61 72 | 65 20 64 6f 6e 65 20 77 |n you ar|e done w|
|000010d0| 69 74 68 20 73 6f 6d 65 | 74 68 69 6e 67 2c 20 79 |ith some|thing, y|
|000010e0| 6f 75 20 77 69 6c 6c 20 | 77 61 6e 74 20 74 6f 20 |ou will |want to |
|000010f0| 6b 6e 6f 77 0a 68 6f 77 | 20 74 6f 20 67 65 74 20 |know.how| to get |
|00001100| 72 69 64 20 6f 66 20 74 | 68 65 20 66 69 6c 65 20 |rid of t|he file |
|00001110| 69 74 20 69 73 20 6f 6e | 2e 20 20 54 68 65 20 63 |it is on|. The c|
|00001120| 6f 6d 6d 61 6e 64 0a 66 | 6f 72 20 74 68 61 74 20 |ommand.f|or that |
|00001130| 69 73 20 22 72 6d 22 20 | 28 72 65 6d 6f 76 65 29 |is "rm" |(remove)|
|00001140| 2e 20 20 46 6f 72 20 65 | 78 61 6d 70 6c 65 0a 20 |. For e|xample. |
|00001150| 20 72 6d 20 6a 75 6e 6b | 0a 74 68 72 6f 77 73 20 | rm junk|.throws |
|00001160| 61 77 61 79 20 74 68 65 | 20 66 69 6c 65 20 6e 61 |away the| file na|
|00001170| 6d 65 64 20 22 6a 75 6e | 6b 22 2e 20 20 4f 6e 63 |med "jun|k". Onc|
|00001180| 65 20 69 74 0a 69 73 20 | 67 6f 6e 65 2c 20 69 74 |e it.is |gone, it|
|00001190| 20 69 73 20 72 65 61 6c | 6c 79 20 67 6f 6e 65 20 | is real|ly gone |
|000011a0| 2d 20 74 68 65 72 65 20 | 69 73 20 6e 6f 20 77 61 |- there |is no wa|
|000011b0| 79 0a 74 6f 20 22 75 6e | 64 6f 22 20 61 20 72 65 |y.to "un|do" a re|
|000011c0| 6d 6f 76 65 20 63 6f 6d | 6d 61 6e 64 2e 20 20 48 |move com|mand. H|
|000011d0| 65 6e 63 65 20 74 68 69 | 73 20 63 6f 6d 6d 61 6e |ence thi|s comman|
|000011e0| 64 0a 73 68 6f 75 6c 64 | 20 62 65 20 75 73 65 64 |d.should| be used|
|000011f0| 20 77 69 74 68 20 63 61 | 75 74 69 6f 6e 2e 0a 49 | with ca|ution..I|
|00001200| 6e 20 74 68 69 73 20 64 | 69 72 65 63 74 6f 72 79 |n this d|irectory|
|00001210| 20 74 68 65 72 65 20 69 | 73 20 6f 6e 65 20 66 69 | there i|s one fi|
|00001220| 6c 65 20 6e 61 6d 65 64 | 0a 66 6f 72 20 61 20 62 |le named|.for a b|
|00001230| 61 73 65 62 61 6c 6c 20 | 70 6c 61 79 65 72 2e 20 |aseball |player. |
|00001240| 20 52 65 6d 6f 76 65 20 | 69 74 2e 0a 54 68 65 6e | Remove |it..Then|
|00001250| 20 74 79 70 65 20 22 72 | 65 61 64 79 22 2e 0a 23 | type "r|eady"..#|
|00001260| 63 72 65 61 74 65 20 6b | 65 72 6e 69 67 68 61 6e |create k|ernighan|
|00001270| 0a 23 63 72 65 61 74 65 | 20 79 61 73 74 72 7a 65 |.#create| yastrze|
|00001280| 6d 73 6b 69 0a 23 75 73 | 65 72 0a 74 65 73 74 20 |mski.#us|er.test |
|00001290| 21 20 2d 72 20 79 61 73 | 74 72 7a 65 6d 73 6b 69 |! -r yas|trzemski|
|000012a0| 20 26 26 20 74 65 73 74 | 20 2d 72 20 6b 65 72 6e | && test| -r kern|
|000012b0| 69 67 68 61 6e 0a 23 6c | 6f 67 0a 23 6e 65 78 74 |ighan.#l|og.#next|
|000012c0| 0a 31 31 2e 31 61 20 31 | 30 0a 31 31 2e 32 61 20 |.11.1a 1|0.11.2a |
|000012d0| 35 0a 31 31 2e 33 61 20 | 32 0a 4c 31 30 2e 32 61 |5.11.3a |2.L10.2a|
|000012e0| 00 00 00 00 00 00 00 00 | e9 10 9c 51 09 01 b4 81 |........|...Q....|
|000012f0| 00 00 2b 01 23 70 72 69 | 6e 74 0a 54 68 65 20 77 |..+.#pri|nt.The w|
|00001300| 61 79 20 74 6f 20 67 65 | 74 20 72 69 64 20 6f 66 |ay to ge|t rid of|
|00001310| 20 61 20 66 69 6c 65 20 | 79 6f 75 20 61 72 65 20 | a file |you are |
|00001320| 66 69 6e 69 73 68 65 64 | 20 77 69 74 68 0a 69 73 |finished| with.is|
|00001330| 20 77 69 74 68 20 74 68 | 65 20 22 72 6d 22 20 28 | with th|e "rm" (|
|00001340| 72 65 6d 6f 76 65 29 20 | 63 6f 6d 6d 61 6e 64 2e |remove) |command.|
|00001350| 20 20 46 6f 72 20 65 78 | 61 6d 70 6c 65 2c 0a 20 | For ex|ample,. |
|00001360| 20 72 6d 20 6a 75 6e 6b | 0a 77 69 6c 6c 20 67 65 | rm junk|.will ge|
|00001370| 74 20 72 69 64 20 6f 66 | 20 74 68 65 20 66 69 6c |t rid of| the fil|
|00001380| 65 20 6e 61 6d 65 64 20 | 22 6a 75 6e 6b 22 2e 0a |e named |"junk"..|
|00001390| 49 6e 20 74 68 69 73 20 | 64 69 72 65 63 74 6f 72 |In this |director|
|000013a0| 79 20 74 68 65 72 65 20 | 69 73 20 61 20 66 69 6c |y there |is a fil|
|000013b0| 65 20 6e 61 6d 65 64 20 | 22 68 61 72 72 79 22 20 |e named |"harry" |
|000013c0| 2d 0a 72 65 6d 6f 76 65 | 20 69 74 2e 0a 54 68 65 |-.remove| it..The|
|000013d0| 6e 20 74 79 70 65 20 22 | 72 65 61 64 79 22 2e 0a |n type "|ready"..|
|000013e0| 23 63 72 65 61 74 65 20 | 68 61 72 72 79 0a 23 75 |#create |harry.#u|
|000013f0| 73 65 72 0a 74 65 73 74 | 20 21 20 2d 72 20 68 61 |ser.test| ! -r ha|
|00001400| 72 72 79 0a 23 6c 6f 67 | 0a 23 6e 65 78 74 0a 31 |rry.#log|.#next.1|
|00001410| 30 2e 32 62 20 35 0a 31 | 30 2e 33 61 20 32 0a 0a |0.2b 5.1|0.3a 2..|
|00001420| 4c 31 30 2e 32 62 00 00 | 00 00 00 00 00 00 e9 10 |L10.2b..|........|
|00001430| 75 af 09 01 b4 81 00 00 | da 01 23 70 72 69 6e 74 |u.......|..#print|
|00001440| 0a 59 6f 75 20 63 61 6e | 20 72 65 6d 6f 76 65 20 |.You can| remove |
|00001450| 73 65 76 65 72 61 6c 20 | 66 69 6c 65 73 20 61 74 |several |files at|
|00001460| 20 6f 6e 63 65 20 77 69 | 74 68 20 74 68 65 20 22 | once wi|th the "|
|00001470| 72 6d 22 20 63 6f 6d 6d | 61 6e 64 2e 0a 41 6e 64 |rm" comm|and..And|
|00001480| 20 79 6f 75 20 63 61 6e | 20 75 73 65 20 74 68 65 | you can| use the|
|00001490| 20 66 61 6d 69 6c 69 61 | 72 20 22 2a 22 20 61 6e | familia|r "*" an|
|000014a0| 64 20 22 3f 22 20 63 68 | 61 72 61 63 74 65 72 73 |d "?" ch|aracters|
|000014b0| 0a 74 6f 20 61 62 62 72 | 65 76 69 61 74 65 20 73 |.to abbr|eviate s|
|000014c0| 65 76 65 72 61 6c 20 66 | 69 6c 65 20 6e 61 6d 65 |everal f|ile name|
|000014d0| 73 2e 20 20 42 55 54 20 | 42 45 20 43 41 52 45 46 |s. BUT |BE CAREF|
|000014e0| 55 4c 20 2d 0a 22 72 6d | 22 20 69 73 20 69 72 72 |UL -."rm|" is irr|
|000014f0| 65 76 65 72 73 69 62 6c | 65 2c 20 61 6e 64 20 69 |eversibl|e, and i|
|00001500| 74 20 69 73 20 61 6c 6c | 20 74 6f 6f 20 65 61 73 |t is all| too eas|
|00001510| 79 20 74 6f 20 74 79 70 | 65 20 73 6f 6d 65 74 68 |y to typ|e someth|
|00001520| 69 6e 67 0a 6c 69 6b 65 | 20 22 72 6d 20 2a 22 20 |ing.like| "rm *" |
|00001530| 61 6e 64 20 67 65 74 20 | 72 69 64 20 6f 66 20 61 |and get |rid of a|
|00001540| 6c 6c 20 79 6f 75 72 20 | 66 69 6c 65 73 2e 0a 49 |ll your |files..I|
|00001550| 6e 20 74 68 69 73 20 64 | 69 72 65 63 74 6f 72 79 |n this d|irectory|
|00001560| 20 61 72 65 20 74 77 6f | 20 66 69 6c 65 73 20 6e | are two| files n|
|00001570| 61 6d 65 64 20 0a 22 70 | 61 72 74 31 22 20 61 6e |amed ."p|art1" an|
|00001580| 64 20 22 70 61 72 74 32 | 22 2e 0a 52 65 6d 6f 76 |d "part2|"..Remov|
|00001590| 65 20 62 6f 74 68 3b 20 | 74 68 65 6e 20 74 79 70 |e both; |then typ|
|000015a0| 65 20 22 72 65 61 64 79 | 22 2e 0a 23 63 72 65 61 |e "ready|"..#crea|
|000015b0| 74 65 20 70 61 72 74 31 | 0a 23 63 72 65 61 74 65 |te part1|.#create|
|000015c0| 20 70 61 72 74 32 0a 23 | 75 73 65 72 0a 74 65 73 | part2.#|user.tes|
|000015d0| 74 20 21 20 2d 72 20 70 | 61 72 74 31 20 26 26 20 |t ! -r p|art1 && |
|000015e0| 74 65 73 74 20 21 20 2d | 72 20 70 61 72 74 32 0a |test ! -|r part2.|
|000015f0| 23 6c 6f 67 0a 23 6e 65 | 78 74 0a 31 31 2e 31 61 |#log.#ne|xt.11.1a|
|00001600| 20 31 30 0a 31 31 2e 32 | 61 20 35 0a 31 31 2e 33 | 10.11.2|a 5.11.3|
|00001610| 61 20 32 0a 4c 31 30 2e | 33 61 00 00 00 00 00 00 |a 2.L10.|3a......|
|00001620| 00 00 e9 10 c5 50 09 01 | b4 81 00 00 8d 01 23 70 |.....P..|......#p|
|00001630| 72 69 6e 74 0a 57 68 65 | 6e 20 79 6f 75 20 61 72 |rint.Whe|n you ar|
|00001640| 65 20 64 6f 6e 65 20 77 | 69 74 68 20 73 6f 6d 65 |e done w|ith some|
|00001650| 74 68 69 6e 67 2c 20 79 | 6f 75 20 77 69 6c 6c 20 |thing, y|ou will |
|00001660| 77 61 6e 74 20 74 6f 0a | 67 65 74 20 72 69 64 20 |want to.|get rid |
|00001670| 6f 66 20 74 68 65 20 66 | 69 6c 65 20 63 6f 6e 74 |of the f|ile cont|
|00001680| 61 69 6e 69 6e 67 20 69 | 74 2e 20 20 54 68 65 20 |aining i|t. The |
|00001690| 63 6f 6d 6d 61 6e 64 20 | 66 6f 72 20 74 68 61 74 |command |for that|
|000016a0| 0a 69 73 20 22 72 6d 22 | 20 28 72 65 6d 6f 76 65 |.is "rm"| (remove|
|000016b0| 29 2e 20 20 46 6f 72 20 | 65 78 61 6d 70 6c 65 0a |). For |example.|
|000016c0| 20 20 72 6d 20 6a 75 6e | 6b 0a 74 68 72 6f 77 73 | rm jun|k.throws|
|000016d0| 20 61 77 61 79 20 74 68 | 65 20 66 69 6c 65 20 6e | away th|e file n|
|000016e0| 61 6d 65 64 20 22 6a 75 | 6e 6b 22 2e 20 20 54 72 |amed "ju|nk". Tr|
|000016f0| 79 20 74 68 61 74 20 2d | 0a 74 68 65 72 65 27 73 |y that -|.there's|
|00001700| 20 61 20 66 69 6c 65 20 | 6e 61 6d 65 64 20 22 6a | a file |named "j|
|00001710| 75 6e 6b 22 20 69 6e 20 | 74 68 69 73 20 64 69 72 |unk" in |this dir|
|00001720| 65 63 74 6f 72 79 2c 20 | 61 73 20 79 6f 75 20 63 |ectory, |as you c|
|00001730| 61 6e 0a 76 65 72 69 66 | 79 20 62 79 20 64 6f 69 |an.verif|y by doi|
|00001740| 6e 67 20 61 6e 20 22 6c | 73 22 2e 20 20 54 72 79 |ng an "l|s". Try|
|00001750| 20 61 6e 6f 74 68 65 72 | 20 22 6c 73 22 20 61 66 | another| "ls" af|
|00001760| 74 65 72 20 74 68 65 20 | 22 72 6d 20 6a 75 6e 6b |ter the |"rm junk|
|00001770| 22 3b 0a 74 68 65 6e 20 | 74 79 70 65 20 22 72 65 |";.then |type "re|
|00001780| 61 64 79 22 2e 0a 23 63 | 72 65 61 74 65 20 6a 75 |ady"..#c|reate ju|
|00001790| 6e 6b 0a 23 75 73 65 72 | 0a 74 65 73 74 20 21 20 |nk.#user|.test ! |
|000017a0| 2d 72 20 6a 75 6e 6b 0a | 23 6c 6f 67 0a 23 6e 65 |-r junk.|#log.#ne|
|000017b0| 78 74 0a 31 30 2e 33 62 | 20 32 0a 23 4c 31 30 2e |xt.10.3b| 2.#L10.|
|000017c0| 33 62 00 00 00 00 00 00 | 00 00 e9 10 63 50 09 01 |3b......|....cP..|
|000017d0| b4 81 00 00 0b 01 23 70 | 72 69 6e 74 0a 4f 66 74 |......#p|rint.Oft|
|000017e0| 65 6e 20 79 6f 75 20 77 | 69 6c 6c 20 75 73 65 20 |en you w|ill use |
|000017f0| 22 6c 73 22 20 77 69 74 | 68 20 22 72 6d 22 0a 74 |"ls" wit|h "rm".t|
|00001800| 6f 20 66 69 72 73 74 20 | 66 69 6e 64 20 74 68 65 |o first |find the|
|00001810| 20 6e 61 6d 65 20 6f 66 | 20 61 20 66 69 6c 65 2c | name of| a file,|
|00001820| 20 61 6e 64 20 74 68 65 | 6e 20 72 65 6d 6f 76 65 | and the|n remove|
|00001830| 20 69 74 2e 0a 54 68 69 | 73 20 64 69 72 65 63 74 | it..Thi|s direct|
|00001840| 6f 72 79 20 63 6f 6e 74 | 61 69 6e 73 20 6f 6e 65 |ory cont|ains one|
|00001850| 20 66 69 6c 65 20 77 68 | 6f 73 65 20 6e 61 6d 65 | file wh|ose name|
|00001860| 20 62 65 67 69 6e 73 20 | 77 69 74 68 20 22 67 22 | begins |with "g"|
|00001870| 2e 0a 46 69 6e 64 20 6f | 75 74 20 77 68 61 74 20 |..Find o|ut what |
|00001880| 69 74 20 69 73 20 61 6e | 64 20 72 65 6d 6f 76 65 |it is an|d remove|
|00001890| 20 69 74 2e 0a 54 68 65 | 6e 20 74 79 70 65 20 22 | it..The|n type "|
|000018a0| 72 65 61 64 79 22 2e 0a | 23 63 72 65 61 74 65 20 |ready"..|#create |
|000018b0| 67 65 6f 72 67 65 0a 23 | 75 73 65 72 0a 74 65 73 |george.#|user.tes|
|000018c0| 74 20 21 20 2d 72 20 67 | 65 6f 72 67 65 0a 23 6c |t ! -r g|eorge.#l|
|000018d0| 6f 67 0a 23 6e 65 78 74 | 0a 31 30 2e 33 63 20 32 |og.#next|.10.3c 2|
|000018e0| 0a 20 4c 31 30 2e 33 63 | 00 00 00 00 00 00 00 00 |. L10.3c|........|
|000018f0| e9 10 24 50 09 01 b4 81 | 00 00 4d 01 23 70 72 69 |..$P....|..M.#pri|
|00001900| 6e 74 0a 59 6f 75 20 63 | 61 6e 20 72 65 6d 6f 76 |nt.You c|an remov|
|00001910| 65 20 73 65 76 65 72 61 | 6c 20 66 69 6c 65 73 20 |e severa|l files |
|00001920| 61 74 20 6f 6e 63 65 20 | 77 69 74 68 20 74 68 65 |at once |with the|
|00001930| 0a 22 72 6d 22 20 63 6f | 6d 6d 61 6e 64 3b 20 66 |."rm" co|mmand; f|
|00001940| 6f 72 20 65 78 61 6d 70 | 6c 65 2c 0a 20 20 72 6d |or examp|le,. rm|
|00001950| 20 74 6f 6d 20 64 69 63 | 6b 20 68 61 72 72 79 0a | tom dic|k harry.|
|00001960| 77 69 6c 6c 20 72 65 6d | 6f 76 65 20 74 68 65 20 |will rem|ove the |
|00001970| 66 69 6c 65 73 20 22 74 | 6f 6d 22 2c 20 22 64 69 |files "t|om", "di|
|00001980| 63 6b 22 2c 20 61 6e 64 | 20 22 68 61 72 72 79 22 |ck", and| "harry"|
|00001990| 2e 0a 54 68 65 72 65 20 | 61 72 65 20 74 77 6f 20 |..There |are two |
|000019a0| 66 69 6c 65 73 20 69 6e | 20 74 68 69 73 20 64 69 |files in| this di|
|000019b0| 72 65 63 74 6f 72 79 20 | 6e 61 6d 65 64 0a 66 6f |rectory |named.fo|
|000019c0| 72 20 62 69 72 64 73 3a | 20 67 65 74 20 72 69 64 |r birds:| get rid|
|000019d0| 20 6f 66 20 62 6f 74 68 | 2e 0a 54 68 65 6e 20 74 | of both|..Then t|
|000019e0| 79 70 65 20 22 72 65 61 | 64 79 22 2e 0a 23 63 72 |ype "rea|dy"..#cr|
|000019f0| 65 61 74 65 20 65 61 67 | 6c 65 0a 23 63 72 65 61 |eate eag|le.#crea|
|00001a00| 74 65 20 62 6c 75 65 6a | 61 79 0a 23 75 73 65 72 |te bluej|ay.#user|
|00001a10| 0a 74 65 73 74 20 21 20 | 2d 72 20 65 61 67 6c 65 |.test ! |-r eagle|
|00001a20| 20 26 26 20 74 65 73 74 | 20 21 20 2d 72 20 62 6c | && test| ! -r bl|
|00001a30| 75 65 6a 61 79 0a 23 6c | 6f 67 0a 23 6e 65 78 74 |uejay.#l|og.#next|
|00001a40| 0a 31 30 2e 33 64 20 32 | 0a 65 4c 31 30 2e 33 64 |.10.3d 2|.eL10.3d|
|00001a50| 00 00 00 00 00 00 00 00 | cd 10 01 5f 09 01 b4 81 |........|..._....|
|00001a60| 00 00 94 01 23 70 72 69 | 6e 74 0a 59 6f 75 20 63 |....#pri|nt.You c|
|00001a70| 61 6e 20 61 6c 73 6f 20 | 75 73 65 20 22 2a 22 20 |an also |use "*" |
|00001a80| 61 6e 64 20 22 3f 22 20 | 77 69 74 68 0a 74 68 65 |and "?" |with.the|
|00001a90| 20 22 72 6d 22 20 63 6f | 6d 6d 61 6e 64 2e 20 20 | "rm" co|mmand. |
|00001aa0| 42 55 54 20 42 45 20 56 | 45 52 59 20 43 41 52 45 |BUT BE V|ERY CARE|
|00001ab0| 46 55 4c 0a 73 69 6e 63 | 65 2c 20 66 6f 72 20 65 |FUL.sinc|e, for e|
|00001ac0| 78 61 6d 70 6c 65 2c 20 | 22 72 6d 20 2a 22 20 77 |xample, |"rm *" w|
|00001ad0| 69 6c 6c 20 74 68 72 6f | 77 20 61 77 61 79 0a 41 |ill thro|w away.A|
|00001ae0| 4c 4c 20 74 68 65 20 66 | 69 6c 65 73 20 69 6e 20 |LL the f|iles in |
|00001af0| 61 20 64 69 72 65 63 74 | 6f 72 79 2e 0a 49 6e 20 |a direct|ory..In |
|00001b00| 74 68 69 73 20 64 69 72 | 65 63 74 6f 72 79 20 61 |this dir|ectory a|
|00001b10| 72 65 20 73 6f 6d 65 20 | 66 69 6c 65 73 20 6e 61 |re some |files na|
|00001b20| 6d 65 64 0a 63 68 75 6e | 6b 31 2c 20 63 68 75 6e |med.chun|k1, chun|
|00001b30| 6b 32 2c 20 63 68 75 6e | 6b 33 20 61 6e 64 20 63 |k2, chun|k3 and c|
|00001b40| 68 75 6e 6b 34 2e 0a 47 | 65 74 20 72 69 64 20 6f |hunk4..G|et rid o|
|00001b50| 66 20 74 68 65 6d 2e 20 | 20 54 68 65 6e 20 74 79 |f them. | Then ty|
|00001b60| 70 65 20 22 72 65 61 64 | 79 22 2e 0a 23 63 72 65 |pe "read|y"..#cre|
|00001b70| 61 74 65 20 58 31 0a 23 | 0a 6c 73 20 3e 58 32 0a |ate X1.#|.ls >X2.|
|00001b80| 23 63 72 65 61 74 65 20 | 63 68 75 6e 6b 31 0a 23 |#create |chunk1.#|
|00001b90| 63 72 65 61 74 65 20 63 | 68 75 6e 6b 32 0a 23 63 |create c|hunk2.#c|
|00001ba0| 72 65 61 74 65 20 63 68 | 75 6e 6b 33 0a 23 63 72 |reate ch|unk3.#cr|
|00001bb0| 65 61 74 65 20 63 68 75 | 6e 6b 34 0a 23 75 73 65 |eate chu|nk4.#use|
|00001bc0| 72 0a 6c 73 20 3e 58 31 | 0a 23 63 6d 70 20 58 31 |r.ls >X1|.#cmp X1|
|00001bd0| 20 58 32 0a 23 6c 6f 67 | 0a 23 6e 65 78 74 0a 31 | X2.#log|.#next.1|
|00001be0| 31 2e 31 61 20 31 30 0a | 31 31 2e 32 61 20 35 0a |1.1a 10.|11.2a 5.|
|00001bf0| 31 31 2e 33 61 20 32 0a | 4c 31 31 2e 31 61 00 00 |11.3a 2.|L11.1a..|
|00001c00| 00 00 00 00 00 00 e9 10 | 1b b0 09 01 b4 81 00 00 |........|........|
|00001c10| ae 03 23 70 72 69 6e 74 | 0a 54 6f 20 63 72 65 61 |..#print|.To crea|
|00001c20| 74 65 20 61 20 73 65 63 | 6f 6e 64 20 63 6f 70 79 |te a sec|ond copy|
|00001c30| 20 6f 66 20 61 20 66 69 | 6c 65 2c 20 74 68 65 20 | of a fi|le, the |
|00001c40| 65 61 73 69 65 73 74 0a | 77 61 79 20 69 73 20 74 |easiest.|way is t|
|00001c50| 6f 20 75 73 65 20 74 68 | 65 20 22 63 70 22 20 28 |o use th|e "cp" (|
|00001c60| 63 6f 70 79 29 20 63 6f | 6d 6d 61 6e 64 2e 0a 49 |copy) co|mmand..I|
|00001c70| 66 20 79 6f 75 20 74 65 | 6c 6c 20 74 68 65 20 63 |f you te|ll the c|
|00001c80| 6f 6d 70 75 74 65 72 0a | 20 20 63 70 20 78 20 79 |omputer.| cp x y|
|00001c90| 0a 61 20 63 6f 70 79 20 | 6f 66 20 66 69 6c 65 20 |.a copy |of file |
|00001ca0| 22 78 22 20 69 73 20 6d | 61 64 65 20 61 6e 64 20 |"x" is m|ade and |
|00001cb0| 6e 61 6d 65 64 20 22 79 | 22 2e 0a 4e 6f 74 65 20 |named "y|"..Note |
|00001cc0| 74 68 61 74 20 74 68 69 | 73 20 69 73 20 73 69 6d |that thi|s is sim|
|00001cd0| 69 6c 61 72 20 74 6f 20 | 22 6d 76 22 20 69 6e 20 |ilar to |"mv" in |
|00001ce0| 74 68 61 74 20 61 20 6e | 65 77 0a 66 69 6c 65 20 |that a n|ew.file |
|00001cf0| 6e 61 6d 65 64 20 22 79 | 22 20 61 70 70 65 61 72 |named "y|" appear|
|00001d00| 73 2c 20 62 75 74 20 74 | 68 65 20 64 69 66 66 65 |s, but t|he diffe|
|00001d10| 72 65 6e 63 65 20 69 73 | 0a 74 68 61 74 20 74 68 |rence is|.that th|
|00001d20| 65 20 6f 6c 64 20 66 69 | 6c 65 20 69 73 20 6e 6f |e old fi|le is no|
|00001d30| 74 20 72 65 6d 6f 76 65 | 64 2e 0a 28 49 66 20 74 |t remove|d..(If t|
|00001d40| 68 65 72 65 20 77 61 73 | 20 61 6c 72 65 61 64 79 |here was| already|
|00001d50| 20 61 20 66 69 6c 65 20 | 6e 61 6d 65 64 20 22 79 | a file |named "y|
|00001d60| 22 2c 20 74 68 6f 75 67 | 68 2c 20 74 68 65 0a 6f |", thoug|h, the.o|
|00001d70| 6c 64 20 63 6f 6e 74 65 | 6e 74 73 20 61 72 65 20 |ld conte|nts are |
|00001d80| 6c 6f 73 74 3b 20 62 65 | 20 63 61 72 65 66 75 6c |lost; be| careful|
|00001d90| 2e 29 0a 0a 49 6e 20 74 | 68 69 73 20 64 69 72 65 |.)..In t|his dire|
|00001da0| 63 74 6f 72 79 20 74 68 | 65 72 65 20 69 73 20 61 |ctory th|ere is a|
|00001db0| 20 66 69 6c 65 20 77 68 | 69 63 68 20 68 61 73 0a | file wh|ich has.|
|00001dc0| 61 20 66 69 76 65 20 6c | 65 74 74 65 72 20 6e 61 |a five l|etter na|
|00001dd0| 6d 65 20 77 68 6f 73 65 | 20 66 69 72 73 74 20 66 |me whose| first f|
|00001de0| 6f 75 72 20 6c 65 74 74 | 65 72 73 0a 61 72 65 20 |our lett|ers.are |
|00001df0| 22 70 61 72 74 22 2e 0a | 50 72 69 6e 74 20 69 74 |"part"..|Print it|
|00001e00| 20 6f 75 74 3b 20 69 74 | 20 77 69 6c 6c 20 74 65 | out; it| will te|
|00001e10| 6c 6c 20 79 6f 75 20 74 | 6f 20 63 6f 70 79 0a 69 |ll you t|o copy.i|
|00001e20| 74 20 61 6e 64 20 77 68 | 61 74 20 74 6f 20 63 61 |t and wh|at to ca|
|00001e30| 6c 6c 20 74 68 65 20 63 | 6f 70 79 2e 0a 44 6f 20 |ll the c|opy..Do |
|00001e40| 74 68 61 74 20 61 6e 64 | 20 74 68 65 6e 20 74 79 |that and| then ty|
|00001e50| 70 65 20 22 72 65 61 64 | 79 22 2e 0a 23 63 72 65 |pe "read|y"..#cre|
|00001e60| 61 74 65 20 58 31 0a 23 | 63 72 65 61 74 65 20 67 |ate X1.#|create g|
|00001e70| 65 6f 72 67 65 0a 23 63 | 72 65 61 74 65 20 70 61 |eorge.#c|reate pa|
|00001e80| 72 74 30 30 0a 74 68 69 | 73 20 69 73 20 6e 6f 74 |rt00.thi|s is not|
|00001e90| 20 74 68 65 20 72 69 67 | 68 74 20 66 69 6c 65 20 | the rig|ht file |
|00001ea0| 61 6e 64 20 79 6f 75 20 | 73 68 6f 75 6c 64 6e 27 |and you |shouldn'|
|00001eb0| 74 0a 68 61 76 65 20 70 | 72 69 6e 74 65 64 20 69 |t.have p|rinted i|
|00001ec0| 74 2e 20 20 55 73 65 0a | 20 70 61 72 74 3f 0a 6e |t. Use.| part?.n|
|00001ed0| 6f 74 0a 20 70 61 72 74 | 2a 0a 69 6e 20 74 68 69 |ot. part|*.in thi|
|00001ee0| 73 20 65 78 61 6d 70 6c | 65 2e 0a 23 63 72 65 61 |s exampl|e..#crea|
|00001ef0| 74 65 20 70 61 72 74 33 | 0a 54 68 69 73 20 69 73 |te part3|.This is|
|00001f00| 20 74 68 65 20 66 69 6c | 65 20 22 70 61 72 74 33 | the fil|e "part3|
|00001f10| 22 2e 20 20 49 20 68 6f | 70 65 20 79 6f 75 0a 75 |". I ho|pe you.u|
|00001f20| 73 65 64 20 61 20 63 6f | 6d 6d 61 6e 64 20 6c 69 |sed a co|mmand li|
|00001f30| 6b 65 0a 20 20 6c 73 20 | 70 61 72 74 3f 0a 6f 72 |ke. ls |part?.or|
|00001f40| 0a 20 20 63 61 74 20 70 | 61 72 74 3f 0a 74 6f 20 |. cat p|art?.to |
|00001f50| 66 69 6e 64 20 69 74 2e | 0a 4d 61 6b 65 20 61 20 |find it.|.Make a |
|00001f60| 63 6f 70 79 20 6f 66 20 | 74 68 69 73 20 66 69 6c |copy of |this fil|
|00001f70| 65 20 6f 6e 20 66 69 6c | 65 20 22 67 65 6f 72 67 |e on fil|e "georg|
|00001f80| 65 22 2e 0a 23 75 73 65 | 72 0a 23 63 6d 70 20 67 |e"..#use|r.#cmp g|
|00001f90| 65 6f 72 67 65 20 70 61 | 72 74 33 0a 23 6c 6f 67 |eorge pa|rt3.#log|
|00001fa0| 0a 23 6e 65 78 74 0a 31 | 32 2e 31 61 20 31 30 0a |.#next.1|2.1a 10.|
|00001fb0| 31 32 2e 32 61 20 35 0a | 31 32 2e 33 61 20 32 0a |12.2a 5.|12.3a 2.|
|00001fc0| 4c 31 31 2e 32 61 00 00 | 00 00 00 00 00 00 cd 10 |L11.2a..|........|
|00001fd0| 06 5f 09 01 b4 81 00 00 | 3d 01 23 70 72 69 6e 74 |._......|=.#print|
|00001fe0| 0a 54 6f 20 6d 61 6b 65 | 20 61 20 6e 65 77 20 63 |.To make| a new c|
|00001ff0| 6f 70 79 20 6f 66 20 61 | 20 66 69 6c 65 2c 20 74 |opy of a| file, t|
|00002000| 68 65 20 65 61 73 69 65 | 73 74 0a 77 61 79 20 69 |he easie|st.way i|
|00002010| 73 20 74 6f 20 75 73 65 | 20 74 68 65 20 22 63 70 |s to use| the "cp|
|00002020| 22 20 63 6f 6d 6d 61 6e | 64 2e 0a 49 66 20 79 6f |" comman|d..If yo|
|00002030| 75 20 74 79 70 65 20 0a | 20 20 63 70 20 78 20 79 |u type .| cp x y|
|00002040| 0a 61 20 63 6f 70 79 20 | 6f 66 20 66 69 6c 65 20 |.a copy |of file |
|00002050| 22 78 22 20 69 73 20 6d | 61 64 65 20 61 6e 64 20 |"x" is m|ade and |
|00002060| 6e 61 6d 65 64 20 22 79 | 22 2e 0a 54 68 69 73 20 |named "y|"..This |
|00002070| 64 69 72 65 63 74 6f 72 | 79 20 63 6f 6e 74 61 69 |director|y contai|
|00002080| 6e 73 20 61 20 66 69 6c | 65 20 6e 61 6d 65 64 20 |ns a fil|e named |
|00002090| 22 67 65 6f 72 67 65 22 | 3b 0a 6d 61 6b 65 20 61 |"george"|;.make a|
|000020a0| 20 63 6f 70 79 20 6e 61 | 6d 65 64 20 20 22 73 74 | copy na|med "st|
|000020b0| 65 76 65 22 2e 0a 54 68 | 65 6e 20 74 79 70 65 20 |eve"..Th|en type |
|000020c0| 22 72 65 61 64 79 22 2e | 0a 23 63 72 65 61 74 65 |"ready".|.#create|
|000020d0| 20 67 65 6f 72 67 65 0a | 74 68 69 73 20 69 73 20 | george.|this is |
|000020e0| 66 69 6c 65 20 67 65 6f | 72 67 65 0a 23 75 73 65 |file geo|rge.#use|
|000020f0| 72 0a 23 63 6d 70 20 73 | 74 65 76 65 20 67 65 6f |r.#cmp s|teve geo|
|00002100| 72 67 65 0a 23 6c 6f 67 | 0a 23 6e 65 78 74 0a 31 |rge.#log|.#next.1|
|00002110| 31 2e 32 62 20 35 0a 20 | 4c 31 31 2e 32 62 00 00 |1.2b 5. |L11.2b..|
|00002120| 00 00 00 00 00 00 e9 10 | 25 b0 09 01 b4 81 00 00 |........|%.......|
|00002130| d5 01 23 70 72 69 6e 74 | 0a 43 6f 6e 74 72 61 73 |..#print|.Contras|
|00002140| 74 20 0a 20 63 70 20 6f | 6c 64 20 6e 65 77 0a 77 |t . cp o|ld new.w|
|00002150| 69 74 68 20 0a 20 6d 76 | 20 6f 6c 64 20 6e 65 77 |ith . mv| old new|
|00002160| 0a 61 73 20 63 6f 6d 6d | 61 6e 64 73 3b 20 62 6f |.as comm|ands; bo|
|00002170| 74 68 20 63 61 75 73 65 | 20 22 6e 65 77 22 20 74 |th cause| "new" t|
|00002180| 6f 20 61 70 70 65 61 72 | 2c 0a 62 75 74 20 22 63 |o appear|,.but "c|
|00002190| 70 22 20 64 6f 65 73 20 | 6e 6f 74 20 72 65 6d 6f |p" does |not remo|
|000021a0| 76 65 20 22 6f 6c 64 22 | 2e 0a 42 6f 74 68 2c 20 |ve "old"|..Both, |
|000021b0| 62 79 20 74 68 65 20 77 | 61 79 2c 20 64 65 73 74 |by the w|ay, dest|
|000021c0| 72 6f 79 20 61 6e 79 74 | 68 69 6e 67 0a 74 68 61 |roy anyt|hing.tha|
|000021d0| 74 20 68 61 70 70 65 6e | 65 64 20 74 6f 20 62 65 |t happen|ed to be|
|000021e0| 20 61 72 6f 75 6e 64 20 | 6e 61 6d 65 64 20 22 6e | around |named "n|
|000021f0| 65 77 22 2e 0a 54 68 65 | 72 65 20 69 73 20 61 20 |ew"..The|re is a |
|00002200| 66 69 6c 65 20 69 6e 20 | 74 68 69 73 20 64 69 72 |file in |this dir|
|00002210| 65 63 74 6f 72 79 0a 77 | 68 6f 73 65 20 6e 61 6d |ectory.w|hose nam|
|00002220| 65 20 65 6e 64 73 20 69 | 6e 20 22 78 22 2e 20 20 |e ends i|n "x". |
|00002230| 55 73 65 20 22 6c 73 22 | 0a 77 69 74 68 20 74 68 |Use "ls"|.with th|
|00002240| 65 20 22 2a 78 22 20 63 | 6f 6e 73 74 72 75 63 74 |e "*x" c|onstruct|
|00002250| 69 6f 6e 20 74 6f 20 66 | 69 6e 64 20 69 74 73 20 |ion to f|ind its |
|00002260| 6e 61 6d 65 3b 0a 74 68 | 65 6e 20 63 6f 70 79 20 |name;.th|en copy |
|00002270| 69 74 20 74 6f 20 66 69 | 6c 65 20 22 6e 65 77 22 |it to fi|le "new"|
|00002280| 2c 20 61 6e 64 20 74 79 | 70 65 20 22 72 65 61 64 |, and ty|pe "read|
|00002290| 79 22 2e 0a 23 63 72 65 | 61 74 65 20 6e 65 77 0a |y"..#cre|ate new.|
|000022a0| 6f 6c 64 20 6e 65 77 0a | 23 63 72 65 61 74 65 20 |old new.|#create |
|000022b0| 70 69 78 0a 6e 65 77 20 | 6e 65 77 0a 23 63 72 65 |pix.new |new.#cre|
|000022c0| 61 74 65 20 78 69 70 0a | 6e 6f 74 68 69 6e 67 0a |ate xip.|nothing.|
|000022d0| 23 75 73 65 72 0a 23 63 | 6d 70 20 70 69 78 20 6e |#user.#c|mp pix n|
|000022e0| 65 77 0a 23 6c 6f 67 0a | 23 6e 65 78 74 0a 31 32 |ew.#log.|#next.12|
|000022f0| 2e 31 61 20 31 30 0a 31 | 32 2e 32 61 20 35 0a 31 |.1a 10.1|2.2a 5.1|
|00002300| 32 2e 33 61 20 32 0a 74 | 4c 31 31 2e 33 61 00 00 |2.3a 2.t|L11.3a..|
|00002310| 00 00 00 00 00 00 e9 10 | 2c b0 09 01 b4 81 00 00 |........|,.......|
|00002320| 9c 01 23 70 72 69 6e 74 | 0a 54 6f 20 6d 61 6b 65 |..#print|.To make|
|00002330| 20 61 20 63 6f 70 79 20 | 6f 66 20 61 20 66 69 6c | a copy |of a fil|
|00002340| 65 2c 20 79 6f 75 20 63 | 61 6e 20 75 73 65 20 74 |e, you c|an use t|
|00002350| 68 65 0a 22 63 70 22 20 | 28 63 6f 70 79 29 20 63 |he."cp" |(copy) c|
|00002360| 6f 6d 6d 61 6e 64 2e 20 | 20 46 6f 72 20 65 78 61 |ommand. | For exa|
|00002370| 6d 70 6c 65 0a 20 63 70 | 20 6f 6c 64 20 6e 65 77 |mple. cp| old new|
|00002380| 0a 77 69 6c 6c 20 6d 61 | 6b 65 20 61 20 63 6f 70 |.will ma|ke a cop|
|00002390| 79 20 6f 66 20 66 69 6c | 65 20 22 6f 6c 64 22 2c |y of fil|e "old",|
|000023a0| 20 6e 61 6d 65 64 20 22 | 6e 65 77 22 2e 0a 54 68 | named "|new"..Th|
|000023b0| 69 73 20 64 69 72 65 63 | 74 6f 72 79 20 63 6f 6e |is direc|tory con|
|000023c0| 74 61 69 6e 73 20 61 20 | 66 69 6c 65 20 6e 61 6d |tains a |file nam|
|000023d0| 65 64 20 22 6f 6c 64 22 | 3b 0a 74 72 79 20 74 68 |ed "old"|;.try th|
|000023e0| 65 20 22 63 70 22 20 63 | 6f 6d 6d 61 6e 64 20 74 |e "cp" c|ommand t|
|000023f0| 6f 20 6d 61 6b 65 20 61 | 20 66 69 6c 65 20 6e 61 |o make a| file na|
|00002400| 6d 65 64 20 22 6e 65 77 | 22 2e 0a 50 72 69 6e 74 |med "new|"..Print|
|00002410| 20 74 68 65 20 66 69 6c | 65 20 74 6f 20 63 68 65 | the fil|e to che|
|00002420| 63 6b 20 6f 6e 20 74 68 | 65 20 63 6f 70 79 2e 0a |ck on th|e copy..|
|00002430| 57 68 65 6e 20 64 6f 6e | 65 2c 20 74 79 70 65 20 |When don|e, type |
|00002440| 22 72 65 61 64 79 22 2e | 0a 23 63 72 65 61 74 65 |"ready".|.#create|
|00002450| 20 6f 6c 64 0a 54 68 65 | 20 42 72 6f 6f 6b 6c 79 | old.The| Brookly|
|00002460| 6e 20 4d 75 73 65 75 6d | 20 69 73 20 61 74 20 31 |n Museum| is at 1|
|00002470| 38 38 20 45 61 73 74 65 | 72 6e 20 50 61 72 6b 77 |88 Easte|rn Parkw|
|00002480| 61 79 2c 0a 42 72 6f 6f | 6b 6c 79 6e 2c 20 4e 59 |ay,.Broo|klyn, NY|
|00002490| 20 31 31 32 33 38 2e 0a | 23 75 73 65 72 0a 23 63 | 11238..|#user.#c|
|000024a0| 6d 70 20 6f 6c 64 20 6e | 65 77 0a 23 6c 6f 67 0a |mp old n|ew.#log.|
|000024b0| 23 6e 65 78 74 0a 31 31 | 2e 33 62 20 32 0a 4c 31 |#next.11|.3b 2.L1|
|000024c0| 31 2e 33 62 00 00 00 00 | 00 00 00 00 e9 10 34 b0 |1.3b....|......4.|
|000024d0| 09 01 b4 81 00 00 c2 00 | 23 70 72 69 6e 74 0a 4e |........|#print.N|
|000024e0| 6f 77 20 74 68 65 72 65 | 20 69 73 20 61 20 66 69 |ow there| is a fi|
|000024f0| 6c 65 20 6e 61 6d 65 64 | 20 22 67 6f 6f 64 22 0a |le named| "good".|
|00002500| 69 6e 20 74 68 69 73 20 | 64 69 72 65 63 74 6f 72 |in this |director|
|00002510| 79 2e 20 20 4d 61 6b 65 | 20 61 20 63 6f 70 79 20 |y. Make| a copy |
|00002520| 6e 61 6d 65 64 20 22 62 | 65 74 74 65 72 22 2c 0a |named "b|etter",.|
|00002530| 74 68 65 6e 20 74 79 70 | 65 20 72 65 61 64 79 2e |then typ|e ready.|
|00002540| 0a 23 63 72 65 61 74 65 | 20 67 6f 6f 64 0a 54 68 |.#create| good.Th|
|00002550| 69 73 20 66 69 6c 65 20 | 68 61 73 20 0a 74 68 72 |is file |has .thr|
|00002560| 65 65 20 6c 69 6e 65 73 | 0a 69 6e 20 69 74 2e 0a |ee lines|.in it..|
|00002570| 23 75 73 65 72 0a 23 63 | 6d 70 20 67 6f 6f 64 20 |#user.#c|mp good |
|00002580| 62 65 74 74 65 72 0a 23 | 6c 6f 67 0a 23 6e 65 78 |better.#|log.#nex|
|00002590| 74 0a 31 31 2e 33 63 20 | 32 0a 4c 31 31 2e 33 63 |t.11.3c |2.L11.3c|
|000025a0| 00 00 00 00 00 00 00 00 | e9 10 3a b0 09 01 b4 81 |........|..:.....|
|000025b0| 00 00 8c 01 23 70 72 69 | 6e 74 0a 54 68 69 73 20 |....#pri|nt.This |
|000025c0| 69 73 20 61 20 6c 69 74 | 74 6c 65 20 74 72 69 63 |is a lit|tle tric|
|000025d0| 6b 69 65 72 2e 20 20 54 | 68 65 20 64 69 72 65 63 |kier. T|he direc|
|000025e0| 74 69 6f 6e 73 0a 66 6f | 72 20 74 68 69 73 20 73 |tions.fo|r this s|
|000025f0| 74 65 70 20 61 72 65 20 | 69 6e 20 61 20 66 69 6c |tep are |in a fil|
|00002600| 65 20 77 68 6f 73 65 0a | 6e 61 6d 65 20 62 65 67 |e whose.|name beg|
|00002610| 69 6e 73 20 77 69 74 68 | 20 22 70 22 2e 20 20 50 |ins with| "p". P|
|00002620| 72 69 6e 74 20 74 68 61 | 74 20 66 69 6c 65 3b 0a |rint tha|t file;.|
|00002630| 69 74 20 77 69 6c 6c 20 | 74 65 6c 6c 20 79 6f 75 |it will |tell you|
|00002640| 20 77 68 61 74 20 74 6f | 20 64 6f 2e 20 20 54 68 | what to| do. Th|
|00002650| 65 6e 20 74 79 70 65 20 | 22 72 65 61 64 79 22 2e |en type |"ready".|
|00002660| 0a 23 63 72 65 61 74 65 | 20 64 65 6c 61 77 61 72 |.#create| delawar|
|00002670| 65 0a 6e 61 72 72 6f 77 | 73 62 75 72 67 0a 70 6f |e.narrow|sburg.po|
|00002680| 72 74 20 6a 65 72 76 69 | 73 0a 64 65 6c 61 77 61 |rt jervi|s.delawa|
|00002690| 72 65 20 77 61 74 65 72 | 20 67 61 70 0a 65 61 73 |re water| gap.eas|
|000026a0| 74 6f 6e 0a 74 72 65 6e | 74 6f 6e 0a 70 68 69 6c |ton.tren|ton.phil|
|000026b0| 61 64 65 6c 70 68 69 61 | 0a 23 63 72 65 61 74 65 |adelphia|.#create|
|000026c0| 20 70 75 62 0a 4d 61 6b | 65 20 61 20 63 6f 70 79 | pub.Mak|e a copy|
|000026d0| 20 6f 66 20 74 68 65 20 | 66 69 6c 65 20 22 64 65 | of the |file "de|
|000026e0| 6c 61 77 61 72 65 22 20 | 77 68 69 63 68 20 69 73 |laware" |which is|
|000026f0| 0a 6e 61 6d 65 64 20 22 | 68 75 64 73 6f 6e 22 2e |.named "|hudson".|
|00002700| 0a 23 75 73 65 72 0a 23 | 63 6d 70 20 64 65 6c 61 |.#user.#|cmp dela|
|00002710| 77 61 72 65 20 68 75 64 | 73 6f 6e 0a 23 6c 6f 67 |ware hud|son.#log|
|00002720| 0a 23 6e 65 78 74 0a 31 | 32 2e 31 61 20 31 30 0a |.#next.1|2.1a 10.|
|00002730| 31 32 2e 32 61 20 35 0a | 31 32 2e 33 61 20 32 0a |12.2a 5.|12.3a 2.|
|00002740| 4c 31 32 2e 31 61 00 00 | 00 00 00 00 00 00 cd 10 |L12.1a..|........|
|00002750| 17 5f 09 01 b4 81 00 00 | 9a 04 23 70 72 69 6e 74 |._......|..#print|
|00002760| 0a 41 6e 6f 74 68 65 72 | 20 76 65 72 79 20 75 73 |.Another| very us|
|00002770| 65 66 75 6c 20 63 6f 6d | 6d 61 6e 64 20 69 73 20 |eful com|mand is |
|00002780| 74 68 65 20 63 6f 6d 6d | 61 6e 64 0a 20 64 69 66 |the comm|and. dif|
|00002790| 66 20 78 20 79 0a 77 68 | 69 63 68 20 63 6f 6d 70 |f x y.wh|ich comp|
|000027a0| 61 72 65 73 20 74 77 6f | 20 66 69 6c 65 73 2e 20 |ares two| files. |
|000027b0| 20 49 74 20 77 69 6c 6c | 20 6e 6f 74 20 70 72 69 | It will| not pri|
|000027c0| 6e 74 0a 61 6e 79 20 6f | 75 74 70 75 74 20 69 66 |nt.any o|utput if|
|000027d0| 20 74 68 65 20 74 77 6f | 20 66 69 6c 65 73 20 61 | the two| files a|
|000027e0| 72 65 20 74 68 65 20 73 | 61 6d 65 2c 20 62 75 74 |re the s|ame, but|
|000027f0| 0a 69 66 20 74 68 65 20 | 66 69 6c 65 73 20 61 72 |.if the |files ar|
|00002800| 65 20 64 69 66 66 65 72 | 65 6e 74 20 69 74 20 77 |e differ|ent it w|
|00002810| 69 6c 6c 20 70 72 69 6e | 74 0a 6f 75 74 20 74 68 |ill prin|t.out th|
|00002820| 65 20 6c 69 6e 65 73 20 | 74 68 61 74 20 61 72 65 |e lines |that are|
|00002830| 20 63 68 61 6e 67 65 64 | 20 69 6e 20 74 68 65 20 | changed| in the |
|00002840| 74 77 6f 20 66 69 6c 65 | 73 2c 0a 69 6e 64 69 63 |two file|s,.indic|
|00002850| 61 74 69 6e 67 20 74 68 | 65 20 6c 69 6e 65 73 20 |ating th|e lines |
|00002860| 66 72 6f 6d 20 74 68 65 | 20 66 69 72 73 74 20 66 |from the| first f|
|00002870| 69 6c 65 20 28 78 29 20 | 62 79 20 61 20 6c 65 61 |ile (x) |by a lea|
|00002880| 64 69 6e 67 20 22 3c 22 | 0a 61 6e 64 20 74 68 65 |ding "<"|.and the|
|00002890| 20 6c 69 6e 65 73 20 66 | 72 6f 6d 20 74 68 65 20 | lines f|rom the |
|000028a0| 73 65 63 6f 6e 64 20 66 | 69 6c 65 20 28 79 29 20 |second f|ile (y) |
|000028b0| 62 79 20 61 20 6c 65 61 | 64 69 6e 67 20 22 3e 22 |by a lea|ding ">"|
|000028c0| 2e 0a 54 68 65 72 65 20 | 61 72 65 20 74 77 6f 20 |..There |are two |
|000028d0| 66 69 6c 65 73 20 69 6e | 20 74 68 69 73 20 64 69 |files in| this di|
|000028e0| 72 65 63 74 6f 72 79 20 | 6e 61 6d 65 64 20 22 6f |rectory |named "o|
|000028f0| 6c 64 22 20 61 6e 64 20 | 22 6e 65 77 22 2e 0a 57 |ld" and |"new"..W|
|00002900| 68 79 20 64 6f 6e 27 74 | 20 79 6f 75 20 66 69 72 |hy don't| you fir|
|00002910| 73 74 20 70 72 69 6e 74 | 20 62 6f 74 68 20 66 69 |st print| both fi|
|00002920| 6c 65 73 2c 20 61 6e 64 | 20 74 68 65 6e 0a 74 72 |les, and| then.tr|
|00002930| 79 20 75 73 69 6e 67 20 | 22 64 69 66 66 22 20 74 |y using |"diff" t|
|00002940| 6f 20 63 6f 6d 70 61 72 | 65 20 74 68 65 6d 3f 20 |o compar|e them? |
|00002950| 20 53 75 70 70 6f 73 65 | 20 74 68 65 20 66 69 6c | Suppose| the fil|
|00002960| 65 73 0a 77 65 72 65 20 | 68 75 6e 64 72 65 64 73 |es.were |hundreds|
|00002970| 20 6f 66 20 6c 69 6e 65 | 73 20 6c 6f 6e 67 2c 20 | of line|s long, |
|00002980| 61 6e 64 20 79 6f 75 20 | 6e 65 65 64 65 64 20 74 |and you |needed t|
|00002990| 6f 20 6b 6e 6f 77 0a 74 | 68 65 20 73 69 6e 67 6c |o know.t|he singl|
|000029a0| 65 20 64 69 66 66 65 72 | 65 6e 63 65 20 2d 20 64 |e differ|ence - d|
|000029b0| 6f 20 79 6f 75 20 73 65 | 65 20 68 6f 77 20 76 61 |o you se|e how va|
|000029c0| 6c 75 61 62 6c 65 20 22 | 64 69 66 66 22 20 63 61 |luable "|diff" ca|
|000029d0| 6e 20 62 65 3f 0a 41 73 | 20 65 76 69 64 65 6e 63 |n be?.As| evidenc|
|000029e0| 65 20 74 68 61 74 20 79 | 6f 75 20 64 69 64 20 61 |e that y|ou did a|
|000029f0| 74 20 6c 65 61 73 74 20 | 68 61 6c 66 20 6f 66 20 |t least |half of |
|00002a00| 74 68 69 73 2c 0a 74 79 | 70 65 20 22 61 6e 73 77 |this,.ty|pe "answ|
|00002a10| 65 72 20 77 6f 72 64 22 | 20 77 68 65 72 65 20 22 |er word"| where "|
|00002a20| 77 6f 72 64 22 20 69 73 | 20 74 68 65 20 77 6f 72 |word" is| the wor|
|00002a30| 64 20 61 64 64 65 64 20 | 74 6f 20 74 68 65 0a 73 |d added |to the.s|
|00002a40| 65 63 6f 6e 64 20 66 69 | 6c 65 2e 0a 23 63 72 65 |econd fi|le..#cre|
|00002a50| 61 74 65 20 6e 65 77 0a | 46 6f 75 72 20 73 63 6f |ate new.|Four sco|
|00002a60| 72 65 20 61 6e 64 20 73 | 65 76 65 6e 0a 79 65 61 |re and s|even.yea|
|00002a70| 72 73 20 61 67 6f 20 6f | 75 72 20 66 61 74 68 65 |rs ago o|ur fathe|
|00002a80| 72 73 0a 62 72 6f 75 67 | 68 74 20 66 6f 72 74 68 |rs.broug|ht forth|
|00002a90| 20 6f 6e 20 74 68 69 73 | 0a 63 6f 6e 74 69 6e 65 | on this|.contine|
|00002aa0| 6e 74 20 61 20 6e 65 77 | 20 6e 61 74 69 6f 6e 2c |nt a new| nation,|
|00002ab0| 0a 63 6f 6e 63 65 69 76 | 65 64 20 69 6e 20 6c 69 |.conceiv|ed in li|
|00002ac0| 62 65 72 74 79 0a 61 6e | 64 20 64 65 64 69 63 61 |berty.an|d dedica|
|00002ad0| 74 65 64 20 74 6f 20 74 | 68 65 20 0a 70 72 6f 70 |ted to t|he .prop|
|00002ae0| 6f 73 69 74 69 6f 6e 20 | 74 68 61 74 20 61 6c 6c |osition |that all|
|00002af0| 0a 6d 65 6e 20 61 72 65 | 20 63 72 65 61 74 65 64 |.men are| created|
|00002b00| 20 65 71 75 61 6c 2e 0a | 23 63 72 65 61 74 65 20 | equal..|#create |
|00002b10| 6f 6c 64 0a 46 6f 75 72 | 20 73 63 6f 72 65 20 61 |old.Four| score a|
|00002b20| 6e 64 20 73 65 76 65 6e | 0a 79 65 61 72 73 20 61 |nd seven|.years a|
|00002b30| 67 6f 20 6f 75 72 20 66 | 61 74 68 65 72 73 0a 62 |go our f|athers.b|
|00002b40| 72 6f 75 67 68 74 20 66 | 6f 72 74 68 20 6f 6e 20 |rought f|orth on |
|00002b50| 74 68 69 73 0a 63 6f 6e | 74 69 6e 65 6e 74 20 61 |this.con|tinent a|
|00002b60| 20 6e 65 77 20 6e 61 74 | 69 6f 6e 2c 0a 63 6f 6e | new nat|ion,.con|
|00002b70| 63 65 69 76 65 64 20 69 | 6e 20 6c 69 62 65 72 74 |ceived i|n libert|
|00002b80| 79 0a 61 6e 64 20 64 65 | 64 69 63 61 74 65 64 20 |y.and de|dicated |
|00002b90| 74 68 65 20 0a 70 72 6f | 70 6f 73 69 74 69 6f 6e |the .pro|position|
|00002ba0| 20 74 68 61 74 20 61 6c | 6c 0a 6d 65 6e 20 61 72 | that al|l.men ar|
|00002bb0| 65 20 63 72 65 61 74 65 | 64 20 65 71 75 61 6c 2e |e create|d equal.|
|00002bc0| 0a 23 63 6f 70 79 69 6e | 0a 23 75 73 65 72 0a 23 |.#copyin|.#user.#|
|00002bd0| 75 6e 63 6f 70 79 69 6e | 0a 23 6d 61 74 63 68 20 |uncopyin|.#match |
|00002be0| 74 6f 0a 23 6c 6f 67 0a | 23 6e 65 78 74 0a 31 33 |to.#log.|#next.13|
|00002bf0| 2e 31 61 0a 4c 31 32 2e | 32 61 00 00 00 00 00 00 |.1a.L12.|2a......|
|00002c00| 00 00 cd 10 19 5f 09 01 | b4 81 00 00 2a 02 23 70 |....._..|....*.#p|
|00002c10| 72 69 6e 74 0a 54 6f 20 | 63 6f 6d 70 61 72 65 20 |rint.To |compare |
|00002c20| 74 77 6f 20 66 69 6c 65 | 73 2c 20 79 6f 75 20 63 |two file|s, you c|
|00002c30| 61 6e 20 75 73 65 20 74 | 68 65 20 63 6f 6d 6d 61 |an use t|he comma|
|00002c40| 6e 64 0a 22 64 69 66 66 | 22 20 28 64 69 66 66 65 |nd."diff|" (diffe|
|00002c50| 72 65 6e 63 65 73 29 3b | 20 74 68 65 20 6c 69 6e |rences);| the lin|
|00002c60| 65 0a 20 20 64 69 66 66 | 20 78 78 20 79 79 0a 77 |e. diff| xx yy.w|
|00002c70| 69 6c 6c 20 63 6f 6d 70 | 61 72 65 20 74 68 65 20 |ill comp|are the |
|00002c80| 66 69 6c 65 73 20 78 78 | 20 61 6e 64 20 79 79 20 |files xx| and yy |
|00002c90| 61 6e 64 20 74 65 6c 6c | 20 79 6f 75 20 61 62 6f |and tell| you abo|
|00002ca0| 75 74 0a 61 6e 79 20 64 | 69 66 66 65 72 65 6e 63 |ut.any d|ifferenc|
|00002cb0| 65 73 20 62 65 74 77 65 | 65 6e 20 74 68 65 6d 2e |es betwe|en them.|
|00002cc0| 20 20 49 66 20 74 68 65 | 20 66 69 6c 65 73 20 61 | If the| files a|
|00002cd0| 72 65 20 74 68 65 20 73 | 61 6d 65 2c 0a 74 68 65 |re the s|ame,.the|
|00002ce0| 20 63 6f 6d 6d 61 6e 64 | 20 73 61 79 73 20 6e 6f | command| says no|
|00002cf0| 74 68 69 6e 67 2e 20 20 | 41 72 65 20 74 68 65 20 |thing. |Are the |
|00002d00| 66 69 6c 65 73 0a 22 74 | 6f 6d 22 20 61 6e 64 20 |files."t|om" and |
|00002d10| 22 64 69 63 6b 22 20 74 | 68 65 20 73 61 6d 65 20 |"dick" t|he same |
|00002d20| 69 6e 20 74 68 69 73 20 | 64 69 72 65 63 74 6f 72 |in this |director|
|00002d30| 79 3f 0a 46 69 6e 64 20 | 6f 75 74 20 28 70 72 69 |y?.Find |out (pri|
|00002d40| 6e 74 20 74 68 65 6d 20 | 69 66 20 79 6f 75 20 66 |nt them |if you f|
|00002d50| 65 65 6c 20 69 6e 73 65 | 63 75 72 65 29 0a 61 6e |eel inse|cure).an|
|00002d60| 64 20 72 65 70 6c 79 20 | 22 79 65 73 22 20 6f 72 |d reply |"yes" or|
|00002d70| 20 22 6e 6f 22 2e 0a 23 | 63 72 65 61 74 65 20 64 | "no"..#|create d|
|00002d80| 69 63 6b 0a 54 68 69 73 | 20 73 74 75 66 66 20 69 |ick.This| stuff i|
|00002d90| 73 20 6e 6f 74 20 6f 6e | 6c 79 20 69 6e 0a 66 69 |s not on|ly in.fi|
|00002da0| 6c 65 20 74 6f 6d 20 62 | 75 74 20 61 6c 73 6f 0a |le tom b|ut also.|
|00002db0| 69 6e 20 66 69 6c 65 20 | 64 69 63 6b 0a 23 63 72 |in file |dick.#cr|
|00002dc0| 65 61 74 65 20 74 6f 6d | 0a 54 68 69 73 20 73 74 |eate tom|.This st|
|00002dd0| 75 66 66 20 69 73 20 6e | 6f 74 20 6f 6e 6c 79 20 |uff is n|ot only |
|00002de0| 69 6e 0a 66 69 6c 65 20 | 74 6f 6d 20 62 75 74 20 |in.file |tom but |
|00002df0| 61 6c 73 6f 0a 69 6e 20 | 66 69 6c 65 20 64 69 63 |also.in |file dic|
|00002e00| 6b 0a 23 63 6f 70 79 69 | 6e 0a 23 75 73 65 72 0a |k.#copyi|n.#user.|
|00002e10| 23 75 6e 63 6f 70 79 69 | 6e 0a 23 6d 61 74 63 68 |#uncopyi|n.#match|
|00002e20| 20 79 65 73 0a 23 6c 6f | 67 0a 23 6e 65 78 74 0a | yes.#lo|g.#next.|
|00002e30| 31 32 2e 32 62 20 35 0a | 4c 31 32 2e 32 62 00 00 |12.2b 5.|L12.2b..|
|00002e40| 00 00 00 00 00 00 d5 10 | 8b 40 09 01 b4 81 00 00 |........|.@......|
|00002e50| b3 01 23 70 72 69 6e 74 | 0a 4e 6f 77 20 61 72 65 |..#print|.Now are|
|00002e60| 20 74 68 65 20 66 69 6c | 65 73 20 22 64 69 63 6b | the fil|es "dick|
|00002e70| 22 20 61 6e 64 20 22 68 | 61 72 72 79 22 20 74 68 |" and "h|arry" th|
|00002e80| 65 20 73 61 6d 65 3f 0a | 41 67 61 69 6e 20 72 65 |e same?.|Again re|
|00002e90| 70 6c 79 20 22 79 65 73 | 22 20 6f 72 20 22 6e 6f |ply "yes|" or "no|
|00002ea0| 22 2e 0a 49 66 20 74 68 | 65 72 65 20 61 72 65 20 |"..If th|ere are |
|00002eb0| 64 69 66 66 65 72 65 6e | 63 65 73 20 62 65 74 77 |differen|ces betw|
|00002ec0| 65 65 6e 20 66 69 6c 65 | 73 2c 20 22 64 69 66 66 |een file|s, "diff|
|00002ed0| 22 20 70 72 69 6e 74 73 | 0a 74 68 65 20 6c 69 6e |" prints|.the lin|
|00002ee0| 65 73 20 74 68 61 74 20 | 61 72 65 20 64 69 66 66 |es that |are diff|
|00002ef0| 65 72 65 6e 74 2c 20 69 | 6e 64 69 63 61 74 69 6e |erent, i|ndicatin|
|00002f00| 67 20 74 68 6f 73 65 0a | 66 72 6f 6d 20 74 68 65 |g those.|from the|
|00002f10| 20 66 69 72 73 74 20 66 | 69 6c 65 20 62 79 20 22 | first f|ile by "|
|00002f20| 3c 22 20 61 6e 64 20 74 | 68 6f 73 65 20 66 72 6f |<" and t|hose fro|
|00002f30| 6d 0a 74 68 65 20 73 65 | 63 6f 6e 64 20 66 69 6c |m.the se|cond fil|
|00002f40| 65 20 62 79 20 22 3e 22 | 2e 0a 23 63 72 65 61 74 |e by ">"|..#creat|
|00002f50| 65 20 64 69 63 6b 0a 6e | 65 77 20 79 6f 72 6b 0a |e dick.n|ew york.|
|00002f60| 62 72 69 64 67 65 70 6f | 72 74 0a 6e 65 77 20 68 |bridgepo|rt.new h|
|00002f70| 61 76 65 6e 0a 6e 65 77 | 20 6c 6f 6e 64 6f 6e 0a |aven.new| london.|
|00002f80| 70 72 6f 76 69 64 65 6e | 63 65 0a 62 6f 73 74 6f |providen|ce.bosto|
|00002f90| 6e 0a 23 63 72 65 61 74 | 65 20 68 61 72 72 79 0a |n.#creat|e harry.|
|00002fa0| 6e 65 77 20 79 6f 72 6b | 0a 62 72 69 64 67 65 70 |new york|.bridgep|
|00002fb0| 6f 72 74 0a 6e 65 77 20 | 68 61 76 65 6e 0a 70 72 |ort.new |haven.pr|
|00002fc0| 6f 76 69 64 65 6e 63 65 | 0a 62 6f 73 74 6f 6e 0a |ovidence|.boston.|
|00002fd0| 23 63 6f 70 79 69 6e 0a | 23 75 73 65 72 0a 23 75 |#copyin.|#user.#u|
|00002fe0| 6e 63 6f 70 79 69 6e 0a | 23 6d 61 74 63 68 20 6e |ncopyin.|#match n|
|00002ff0| 6f 0a 23 6c 6f 67 0a 23 | 6e 65 78 74 0a 31 32 2e |o.#log.#|next.12.|
|00003000| 32 63 20 35 0a 61 4c 31 | 32 2e 32 63 00 00 00 00 |2c 5.aL1|2.2c....|
|00003010| 00 00 00 00 d5 10 40 41 | 09 01 b4 81 00 00 4d 02 |......@A|......M.|
|00003020| 23 70 72 69 6e 74 0a 54 | 68 69 73 20 64 69 72 65 |#print.T|his dire|
|00003030| 63 74 6f 72 79 20 63 6f | 6e 74 61 69 6e 73 20 74 |ctory co|ntains t|
|00003040| 77 6f 20 66 69 6c 65 73 | 20 6e 61 6d 65 64 20 22 |wo files| named "|
|00003050| 6f 6c 64 22 20 61 6e 64 | 20 22 6e 65 77 22 3b 0a |old" and| "new";.|
|00003060| 57 68 61 74 20 77 6f 72 | 64 20 69 73 20 69 6e 20 |What wor|d is in |
|00003070| 6f 6e 65 20 66 69 6c 65 | 20 62 75 74 20 6e 6f 74 |one file| but not|
|00003080| 20 74 68 65 20 6f 74 68 | 65 72 3f 20 20 46 69 6e | the oth|er? Fin|
|00003090| 64 0a 6f 75 74 2e 20 20 | 52 65 70 6c 79 20 22 61 |d.out. |Reply "a|
|000030a0| 6e 73 77 65 72 20 57 4f | 52 44 22 20 77 68 65 72 |nswer WO|RD" wher|
|000030b0| 65 20 57 4f 52 44 20 69 | 73 20 74 68 61 74 20 77 |e WORD i|s that w|
|000030c0| 6f 72 64 2e 0a 23 63 72 | 65 61 74 65 20 6e 65 77 |ord..#cr|eate new|
|000030d0| 0a 46 6f 75 72 20 73 63 | 6f 72 65 20 61 6e 64 20 |.Four sc|ore and |
|000030e0| 73 65 76 65 6e 0a 79 65 | 61 72 73 20 61 67 6f 20 |seven.ye|ars ago |
|000030f0| 6f 75 72 20 66 61 74 68 | 65 72 73 0a 62 72 6f 75 |our fath|ers.brou|
|00003100| 67 68 74 20 66 6f 72 74 | 68 20 6f 6e 20 74 68 69 |ght fort|h on thi|
|00003110| 73 0a 63 6f 6e 74 69 6e | 65 6e 74 20 61 20 6e 65 |s.contin|ent a ne|
|00003120| 77 20 6e 61 74 69 6f 6e | 2c 0a 63 6f 6e 63 65 69 |w nation|,.concei|
|00003130| 76 65 64 20 69 6e 20 6c | 69 62 65 72 74 79 0a 61 |ved in l|iberty.a|
|00003140| 6e 64 20 64 65 64 69 63 | 61 74 65 64 20 74 6f 20 |nd dedic|ated to |
|00003150| 74 68 65 20 0a 70 72 6f | 70 6f 73 69 74 69 6f 6e |the .pro|position|
|00003160| 20 74 68 61 74 20 61 6c | 6c 0a 6d 65 6e 20 61 72 | that al|l.men ar|
|00003170| 65 20 63 72 65 61 74 65 | 64 20 65 71 75 61 6c 2e |e create|d equal.|
|00003180| 0a 23 63 72 65 61 74 65 | 20 6f 6c 64 0a 46 6f 75 |.#create| old.Fou|
|00003190| 72 20 73 63 6f 72 65 20 | 61 6e 64 20 73 65 76 65 |r score |and seve|
|000031a0| 6e 0a 79 65 61 72 73 20 | 61 67 6f 20 6f 75 72 20 |n.years |ago our |
|000031b0| 66 61 74 68 65 72 73 0a | 62 72 6f 75 67 68 74 20 |fathers.|brought |
|000031c0| 66 6f 72 74 68 20 6f 6e | 20 74 68 69 73 0a 63 6f |forth on| this.co|
|000031d0| 6e 74 69 6e 65 6e 74 20 | 61 20 6e 65 77 20 6e 61 |ntinent |a new na|
|000031e0| 74 69 6f 6e 2c 0a 63 6f | 6e 63 65 69 76 65 64 20 |tion,.co|nceived |
|000031f0| 69 6e 20 6c 69 62 65 72 | 74 79 0a 61 6e 64 20 64 |in liber|ty.and d|
|00003200| 65 64 69 63 61 74 65 64 | 20 74 68 65 20 0a 70 72 |edicated| the .pr|
|00003210| 6f 70 6f 73 69 74 69 6f | 6e 20 74 68 61 74 20 61 |opositio|n that a|
|00003220| 6c 6c 0a 6d 65 6e 20 61 | 72 65 20 63 72 65 61 74 |ll.men a|re creat|
|00003230| 65 64 20 65 71 75 61 6c | 2e 0a 23 63 6f 70 79 69 |ed equal|..#copyi|
|00003240| 6e 0a 23 75 73 65 72 0a | 23 75 6e 63 6f 70 79 69 |n.#user.|#uncopyi|
|00003250| 6e 0a 23 6d 61 74 63 68 | 20 74 6f 0a 23 6c 6f 67 |n.#match| to.#log|
|00003260| 0a 23 6e 65 78 74 0a 31 | 33 2e 31 61 0a 69 4c 31 |.#next.1|3.1a.iL1|
|00003270| 32 2e 33 61 00 00 00 00 | 00 00 00 00 ec 10 57 f1 |2.3a....|......W.|
|00003280| 09 01 b4 81 00 00 be 01 | 23 70 72 69 6e 74 0a 41 |........|#print.A|
|00003290| 20 76 65 72 79 20 75 73 | 65 66 75 6c 20 63 6f 6d | very us|eful com|
|000032a0| 6d 61 6e 64 20 69 73 20 | 74 68 65 20 63 6f 6d 6d |mand is |the comm|
|000032b0| 61 6e 64 0a 20 20 64 69 | 66 66 20 78 20 79 0a 77 |and. di|ff x y.w|
|000032c0| 68 69 63 68 20 63 6f 6d | 70 61 72 65 73 20 74 68 |hich com|pares th|
|000032d0| 65 20 74 77 6f 20 66 69 | 6c 65 73 20 78 20 61 6e |e two fi|les x an|
|000032e0| 64 20 79 20 61 6e 64 20 | 74 65 6c 6c 73 0a 79 6f |d y and |tells.yo|
|000032f0| 75 20 61 6e 79 20 64 69 | 66 66 65 72 65 6e 63 65 |u any di|fference|
|00003300| 73 20 62 65 74 77 65 65 | 6e 20 74 68 65 20 66 69 |s betwee|n the fi|
|00003310| 6c 65 73 2e 20 20 49 66 | 20 74 68 65 20 66 69 6c |les. If| the fil|
|00003320| 65 73 0a 61 72 65 20 74 | 68 65 20 73 61 6d 65 2c |es.are t|he same,|
|00003330| 20 69 74 20 73 61 79 73 | 20 6e 6f 74 68 69 6e 67 | it says| nothing|
|00003340| 2e 20 20 54 6f 20 74 65 | 73 74 20 74 68 61 74 2c |. To te|st that,|
|00003350| 0a 63 6f 70 79 20 66 69 | 6c 65 20 22 67 65 6f 72 |.copy fi|le "geor|
|00003360| 67 65 22 20 6f 6e 74 6f | 20 66 69 6c 65 20 22 68 |ge" onto| file "h|
|00003370| 61 72 72 79 22 3b 0a 74 | 68 65 6e 20 73 61 79 0a |arry";.t|hen say.|
|00003380| 20 20 64 69 66 66 20 67 | 65 6f 72 67 65 20 68 61 | diff g|eorge ha|
|00003390| 72 72 79 0a 74 6f 20 76 | 65 72 69 66 79 20 74 68 |rry.to v|erify th|
|000033a0| 61 74 20 74 68 65 20 66 | 69 6c 65 73 20 61 72 65 |at the f|iles are|
|000033b0| 20 74 68 65 20 73 61 6d | 65 2e 0a 23 63 72 65 61 | the sam|e..#crea|
|000033c0| 74 65 20 67 65 6f 72 67 | 65 0a 6c 6f 6e 64 6f 6e |te georg|e.london|
|000033d0| 20 62 72 69 64 67 65 0a | 69 73 20 66 61 6c 6c 69 | bridge.|is falli|
|000033e0| 6e 67 20 64 6f 77 6e 2e | 0a 23 63 6f 70 79 69 6e |ng down.|.#copyin|
|000033f0| 0a 23 75 73 65 72 0a 23 | 75 6e 63 6f 70 79 69 6e |.#user.#|uncopyin|
|00003400| 0a 23 6d 61 74 63 68 20 | 64 69 66 66 20 67 65 6f |.#match |diff geo|
|00003410| 72 67 65 20 68 61 72 72 | 79 0a 23 6d 61 74 63 68 |rge harr|y.#match|
|00003420| 20 64 69 66 66 20 68 61 | 72 72 79 20 67 65 6f 72 | diff ha|rry geor|
|00003430| 67 65 0a 23 6c 6f 67 0a | 23 6e 65 78 74 0a 31 32 |ge.#log.|#next.12|
|00003440| 2e 33 62 20 32 0a 4c 31 | 32 2e 33 62 00 00 00 00 |.3b 2.L1|2.3b....|
|00003450| 00 00 00 00 cd 10 26 5f | 09 01 b4 81 00 00 6c 01 |......&_|......l.|
|00003460| 23 70 72 69 6e 74 0a 41 | 72 65 20 74 68 65 20 66 |#print.A|re the f|
|00003470| 69 6c 65 73 20 22 6d 65 | 6d 6f 31 22 20 61 6e 64 |iles "me|mo1" and|
|00003480| 20 22 6d 65 6d 6f 32 22 | 20 74 68 65 20 73 61 6d | "memo2"| the sam|
|00003490| 65 3f 0a 49 66 20 74 68 | 65 79 20 61 72 65 20 64 |e?.If th|ey are d|
|000034a0| 69 66 66 65 72 65 6e 74 | 2c 20 22 64 69 66 66 22 |ifferent|, "diff"|
|000034b0| 20 77 69 6c 6c 20 70 72 | 69 6e 74 20 74 68 65 0a | will pr|int the.|
|000034c0| 6c 69 6e 65 73 20 74 68 | 61 74 20 61 72 65 20 6e |lines th|at are n|
|000034d0| 6f 74 20 74 68 65 20 73 | 61 6d 65 2e 0a 52 65 70 |ot the s|ame..Rep|
|000034e0| 6c 79 20 22 79 65 73 22 | 20 6f 72 20 22 6e 6f 22 |ly "yes"| or "no"|
|000034f0| 2e 0a 23 63 72 65 61 74 | 65 20 6d 65 6d 6f 31 0a |..#creat|e memo1.|
|00003500| 41 20 71 75 69 63 6b 20 | 62 72 6f 77 6e 20 66 6f |A quick |brown fo|
|00003510| 78 20 6a 75 6d 70 73 20 | 6f 76 65 72 20 74 68 65 |x jumps |over the|
|00003520| 20 6c 61 7a 79 20 64 6f | 67 2e 0a 57 65 20 77 65 | lazy do|g..We we|
|00003530| 72 65 20 61 77 61 79 20 | 61 20 79 65 61 72 20 61 |re away |a year a|
|00003540| 67 6f 2e 0a 23 63 72 65 | 61 74 65 20 6d 65 6d 6f |go..#cre|ate memo|
|00003550| 32 0a 41 20 71 75 69 63 | 6b 20 62 72 6f 77 6e 20 |2.A quic|k brown |
|00003560| 66 6f 78 20 6a 75 6d 70 | 73 20 6f 76 65 72 20 74 |fox jump|s over t|
|00003570| 68 65 20 6c 61 7a 79 20 | 64 6f 67 2e 0a 57 65 20 |he lazy |dog..We |
|00003580| 77 65 72 65 20 61 77 61 | 79 20 61 20 79 65 61 72 |were awa|y a year|
|00003590| 20 61 67 6f 2e 0a 23 63 | 6f 70 79 69 6e 0a 23 75 | ago..#c|opyin.#u|
|000035a0| 73 65 72 0a 23 75 6e 63 | 6f 70 79 69 6e 0a 23 6d |ser.#unc|opyin.#m|
|000035b0| 61 74 63 68 20 79 65 73 | 0a 23 6c 6f 67 0a 23 6e |atch yes|.#log.#n|
|000035c0| 65 78 74 0a 31 32 2e 33 | 63 20 32 0a 4c 31 32 2e |ext.12.3|c 2.L12.|
|000035d0| 33 63 00 00 00 00 00 00 | 00 00 cd 10 29 5f 09 01 |3c......|....)_..|
|000035e0| b4 81 00 00 eb 01 23 70 | 72 69 6e 74 0a 41 72 65 |......#p|rint.Are|
|000035f0| 20 74 68 65 20 66 69 6c | 65 73 20 22 6f 6c 64 22 | the fil|es "old"|
|00003600| 20 61 6e 64 20 22 6e 65 | 77 22 20 69 6e 20 74 68 | and "ne|w" in th|
|00003610| 69 73 20 64 69 72 65 63 | 74 6f 72 79 20 74 68 65 |is direc|tory the|
|00003620| 20 73 61 6d 65 3f 0a 41 | 67 61 69 6e 2c 20 69 66 | same?.A|gain, if|
|00003630| 20 74 68 65 79 20 61 72 | 65 20 6e 6f 74 2c 20 22 | they ar|e not, "|
|00003640| 64 69 66 66 22 20 77 69 | 6c 6c 20 70 72 69 6e 74 |diff" wi|ll print|
|00003650| 20 6f 75 74 20 74 68 65 | 20 64 69 66 66 65 72 65 | out the| differe|
|00003660| 6e 63 65 73 0a 6d 61 72 | 6b 69 6e 67 20 74 68 65 |nces.mar|king the|
|00003670| 20 6c 69 6e 65 73 20 69 | 6e 20 74 68 65 20 66 69 | lines i|n the fi|
|00003680| 72 73 74 20 66 69 6c 65 | 20 6e 61 6d 65 64 20 62 |rst file| named b|
|00003690| 79 20 22 3c 22 20 61 6e | 64 20 74 68 65 0a 6c 69 |y "<" an|d the.li|
|000036a0| 6e 65 73 20 69 6e 20 74 | 68 65 20 73 65 63 6f 6e |nes in t|he secon|
|000036b0| 64 20 66 69 6c 65 20 62 | 79 20 22 3e 22 2e 20 20 |d file b|y ">". |
|000036c0| 43 68 65 63 6b 20 74 68 | 65 20 72 65 73 75 6c 74 |Check th|e result|
|000036d0| 73 20 6f 66 0a 64 69 66 | 66 20 62 79 20 70 72 69 |s of.dif|f by pri|
|000036e0| 6e 74 69 6e 67 20 74 68 | 65 20 66 69 6c 65 73 2e |nting th|e files.|
|000036f0| 20 20 54 68 65 6e 20 74 | 79 70 65 20 22 79 65 73 | Then t|ype "yes|
|00003700| 22 20 6f 72 20 22 6e 6f | 22 2e 0a 23 63 72 65 61 |" or "no|"..#crea|
|00003710| 74 65 20 6e 65 77 0a 54 | 68 69 73 20 66 69 6c 65 |te new.T|his file|
|00003720| 20 68 61 73 20 74 68 72 | 65 65 0a 6c 69 6e 65 73 | has thr|ee.lines|
|00003730| 20 6f 66 20 74 65 78 74 | 20 69 6e 0a 69 74 20 74 | of text| in.it t|
|00003740| 6f 20 72 65 61 64 2e 0a | 61 6e 64 20 74 68 69 73 |o read..|and this|
|00003750| 20 68 61 73 20 6f 6e 65 | 20 6d 6f 72 65 2e 0a 23 | has one| more..#|
|00003760| 63 72 65 61 74 65 20 6f | 6c 64 0a 54 68 69 73 20 |create o|ld.This |
|00003770| 66 69 6c 65 20 68 61 73 | 20 74 68 72 65 65 0a 6c |file has| three.l|
|00003780| 69 6e 65 73 20 6f 66 20 | 74 65 78 74 20 69 6e 0a |ines of |text in.|
|00003790| 69 74 20 74 6f 20 72 65 | 61 64 2e 0a 23 63 6f 70 |it to re|ad..#cop|
|000037a0| 79 69 6e 0a 23 75 73 65 | 72 0a 23 75 6e 63 6f 70 |yin.#use|r.#uncop|
|000037b0| 79 69 6e 0a 23 6d 61 74 | 63 68 20 6e 6f 0a 23 6c |yin.#mat|ch no.#l|
|000037c0| 6f 67 0a 23 6e 65 78 74 | 0a 31 32 2e 32 63 20 35 |og.#next|.12.2c 5|
|000037d0| 0a 65 4c 31 33 2e 31 61 | 00 00 00 00 00 00 00 00 |.eL13.1a|........|
|000037e0| f0 10 10 44 09 01 b4 81 | 00 00 32 01 23 70 72 69 |...D....|..2.#pri|
|000037f0| 6e 74 0a 4c 65 74 27 73 | 20 64 6f 20 61 20 71 75 |nt.Let's| do a qu|
|00003800| 69 63 6b 20 72 65 76 69 | 65 77 20 6f 66 20 74 68 |ick revi|ew of th|
|00003810| 65 20 74 68 69 6e 67 73 | 20 63 6f 76 65 72 65 64 |e things| covered|
|00003820| 0a 69 6e 20 74 68 65 20 | 66 69 6c 65 73 20 63 6f |.in the |files co|
|00003830| 75 72 73 65 2e 20 54 6f | 20 62 65 67 69 6e 2c 20 |urse. To| begin, |
|00003840| 68 6f 77 20 6d 61 6e 79 | 20 66 69 6c 65 73 0a 61 |how many| files.a|
|00003850| 72 65 20 74 68 65 72 65 | 20 69 6e 20 74 68 65 20 |re there| in the |
|00003860| 63 75 72 72 65 6e 74 20 | 64 69 72 65 63 74 6f 72 |current |director|
|00003870| 79 3f 20 54 79 70 65 20 | 22 61 6e 73 77 65 72 20 |y? Type |"answer |
|00003880| 4e 22 2c 0a 77 68 65 72 | 65 20 4e 20 69 73 20 74 |N",.wher|e N is t|
|00003890| 68 65 20 6e 75 6d 62 65 | 72 20 74 68 61 74 20 79 |he numbe|r that y|
|000038a0| 6f 75 20 66 6f 75 6e 64 | 2e 0a 23 63 72 65 61 74 |ou found|..#creat|
|000038b0| 65 20 58 31 0a 23 63 72 | 65 61 74 65 20 58 32 0a |e X1.#cr|eate X2.|
|000038c0| 23 63 6f 70 79 69 6e 0a | 23 75 73 65 72 0a 23 75 |#copyin.|#user.#u|
|000038d0| 6e 63 6f 70 79 69 6e 0a | 6c 73 20 7c 20 25 73 2f |ncopyin.|ls | %s/|
|000038e0| 2e 2e 2f 6c 63 6f 75 6e | 74 20 3e 58 31 0a 74 61 |../lcoun|t >X1.ta|
|000038f0| 69 6c 20 2d 31 20 2e 63 | 6f 70 79 20 3e 58 32 0a |il -1 .c|opy >X2.|
|00003900| 23 63 6d 70 20 58 31 20 | 58 32 0a 23 6c 6f 67 0a |#cmp X1 |X2.#log.|
|00003910| 23 6e 65 78 74 0a 31 33 | 2e 31 62 20 35 0a 4c 31 |#next.13|.1b 5.L1|
|00003920| 33 2e 31 62 00 00 00 00 | 00 00 00 00 d5 10 55 41 |3.1b....|......UA|
|00003930| 09 01 b4 81 00 00 1d 01 | 23 70 72 69 6e 74 0a 54 |........|#print.T|
|00003940| 68 65 72 65 20 69 73 20 | 61 20 66 69 6c 65 20 69 |here is |a file i|
|00003950| 6e 20 74 68 69 73 20 64 | 69 72 65 63 74 6f 72 79 |n this d|irectory|
|00003960| 20 77 68 6f 73 65 20 6e | 61 6d 65 20 62 65 67 69 | whose n|ame begi|
|00003970| 6e 73 0a 77 69 74 68 20 | 27 7a 27 2e 20 44 6f 20 |ns.with |'z'. Do |
|00003980| 77 68 61 74 20 69 74 20 | 74 65 6c 6c 73 20 79 6f |what it |tells yo|
|00003990| 75 20 74 6f 2c 20 74 68 | 65 6e 20 74 79 70 65 20 |u to, th|en type |
|000039a0| 22 72 65 61 64 79 22 2e | 0a 23 63 72 65 61 74 65 |"ready".|.#create|
|000039b0| 20 58 31 0a 23 63 72 65 | 61 74 65 20 58 32 0a 23 | X1.#cre|ate X2.#|
|000039c0| 63 72 65 61 74 65 20 7a | 69 70 0a 52 65 6e 61 6d |create z|ip.Renam|
|000039d0| 65 20 74 68 65 20 66 69 | 6c 65 20 6e 61 6d 65 64 |e the fi|le named|
|000039e0| 20 22 6d 61 72 79 22 20 | 74 6f 20 22 6a 6f 65 22 | "mary" |to "joe"|
|000039f0| 2e 0a 23 63 72 65 61 74 | 65 20 6a 6f 65 0a 49 20 |..#creat|e joe.I |
|00003a00| 61 6d 20 61 20 66 69 6c | 65 0a 23 0a 72 6d 20 2d |am a fil|e.#.rm -|
|00003a10| 66 20 6d 61 72 79 0a 6c | 73 20 3e 58 31 0a 6d 76 |f mary.l|s >X1.mv|
|00003a20| 20 6a 6f 65 20 6d 61 72 | 79 0a 23 75 73 65 72 0a | joe mar|y.#user.|
|00003a30| 6c 73 20 3e 58 32 0a 23 | 63 6d 70 20 58 31 20 58 |ls >X2.#|cmp X1 X|
|00003a40| 32 0a 23 6c 6f 67 0a 23 | 6e 65 78 74 0a 31 33 2e |2.#log.#|next.13.|
|00003a50| 31 63 20 35 0a 32 4c 31 | 33 2e 31 63 00 00 00 00 |1c 5.2L1|3.1c....|
|00003a60| 00 00 00 00 ea 10 60 7b | 09 01 b4 81 00 00 2f 02 |......`{|....../.|
|00003a70| 23 70 72 69 6e 74 0a 54 | 68 65 72 65 20 61 72 65 |#print.T|here are|
|00003a80| 20 74 77 6f 20 66 69 6c | 65 73 20 69 6e 20 74 68 | two fil|es in th|
|00003a90| 69 73 20 64 69 72 65 63 | 74 6f 72 79 20 77 68 6f |is direc|tory who|
|00003aa0| 73 65 20 6e 61 6d 65 73 | 20 62 65 67 69 6e 20 77 |se names| begin w|
|00003ab0| 69 74 68 0a 74 68 65 20 | 6c 65 74 74 65 72 20 27 |ith.the |letter '|
|00003ac0| 72 27 2e 20 4f 6e 20 77 | 68 61 74 20 6c 69 6e 65 |r'. On w|hat line|
|00003ad0| 20 64 6f 20 74 68 65 79 | 20 64 69 66 66 65 72 3f | do they| differ?|
|00003ae0| 0a 54 79 70 65 20 22 61 | 6e 73 77 65 72 20 4e 22 |.Type "a|nswer N"|
|00003af0| 2c 20 77 68 65 72 65 20 | 4e 20 69 73 20 74 68 65 |, where |N is the|
|00003b00| 20 6c 69 6e 65 20 6e 75 | 6d 62 65 72 20 77 68 65 | line nu|mber whe|
|00003b10| 72 65 20 74 68 65 79 0a | 66 69 72 73 74 20 61 72 |re they.|first ar|
|00003b20| 65 20 64 69 66 66 65 72 | 65 6e 74 2e 0a 23 63 72 |e differ|ent..#cr|
|00003b30| 65 61 74 65 20 72 65 66 | 0a 54 68 69 73 20 69 73 |eate ref|.This is|
|00003b40| 20 61 20 76 65 72 79 20 | 73 68 6f 72 74 20 66 69 | a very |short fi|
|00003b50| 6c 65 0a 77 68 69 63 68 | 20 63 6f 6e 74 61 69 6e |le.which| contain|
|00003b60| 73 20 73 65 76 65 72 61 | 6c 20 6c 69 6e 65 73 0a |s severa|l lines.|
|00003b70| 73 6f 6d 65 20 6f 6e 65 | 20 6f 66 20 77 68 69 63 |some one| of whic|
|00003b80| 68 20 77 69 6c 6c 20 62 | 65 20 63 68 61 6e 67 65 |h will b|e change|
|00003b90| 64 0a 69 6e 20 74 68 65 | 20 6f 74 68 65 72 20 76 |d.in the| other v|
|00003ba0| 65 72 73 69 6f 6e 2c 20 | 61 6e 64 20 79 6f 75 72 |ersion, |and your|
|00003bb0| 0a 6a 6f 62 20 69 73 20 | 74 6f 20 66 69 6e 64 20 |.job is |to find |
|00003bc0| 6f 75 74 20 77 68 69 63 | 68 2e 0a 23 63 72 65 61 |out whic|h..#crea|
|00003bd0| 74 65 20 72 65 66 6e 65 | 77 0a 54 68 69 73 20 69 |te refne|w.This i|
|00003be0| 73 20 61 20 76 65 72 79 | 20 73 68 6f 72 74 20 66 |s a very| short f|
|00003bf0| 69 6c 65 0a 77 68 69 63 | 68 20 63 6f 6e 74 61 69 |ile.whic|h contai|
|00003c00| 6e 73 20 73 65 76 65 72 | 61 6c 20 6c 69 6e 65 73 |ns sever|al lines|
|00003c10| 0a 73 6f 6d 65 20 20 6f | 6e 65 20 6f 66 20 77 68 |.some o|ne of wh|
|00003c20| 69 63 68 20 77 69 6c 6c | 20 62 65 20 63 68 61 6e |ich will| be chan|
|00003c30| 67 65 64 0a 69 6e 20 74 | 68 65 20 6f 74 68 65 72 |ged.in t|he other|
|00003c40| 20 76 65 72 73 69 6f 6e | 2c 20 61 6e 64 20 79 6f | version|, and yo|
|00003c50| 75 72 0a 6a 6f 62 20 69 | 73 20 74 6f 20 66 69 6e |ur.job i|s to fin|
|00003c60| 64 20 6f 75 74 20 77 68 | 69 63 68 2e 0a 23 63 6f |d out wh|ich..#co|
|00003c70| 70 79 69 6e 0a 23 75 73 | 65 72 0a 23 75 6e 63 6f |pyin.#us|er.#unco|
|00003c80| 70 79 69 6e 0a 23 6d 61 | 74 63 68 20 33 0a 23 6c |pyin.#ma|tch 3.#l|
|00003c90| 6f 67 0a 23 6e 65 78 74 | 0a 31 33 2e 31 64 0a 6f |og.#next|.13.1d.o|
|00003ca0| 4c 31 33 2e 31 64 00 00 | 00 00 00 00 00 00 cd 10 |L13.1d..|........|
|00003cb0| 35 5f 09 01 b4 81 00 00 | fa 00 23 70 72 69 6e 74 |5_......|..#print|
|00003cc0| 0a 54 68 65 72 65 20 61 | 72 65 20 73 65 76 65 72 |.There a|re sever|
|00003cd0| 61 6c 20 66 69 6c 65 73 | 20 69 6e 20 74 68 69 73 |al files| in this|
|00003ce0| 20 64 69 72 65 63 74 6f | 72 79 20 77 68 6f 73 65 | directo|ry whose|
|00003cf0| 20 6e 61 6d 65 73 0a 62 | 65 67 69 6e 20 77 69 74 | names.b|egin wit|
|00003d00| 68 20 22 65 61 73 79 22 | 2e 20 52 65 6d 6f 76 65 |h "easy"|. Remove|
|00003d10| 20 74 68 65 6d 2c 20 74 | 68 65 6e 20 74 79 70 65 | them, t|hen type|
|00003d20| 20 22 72 65 61 64 79 22 | 2e 0a 23 63 72 65 61 74 | "ready"|..#creat|
|00003d30| 65 20 58 31 0a 23 63 72 | 65 61 74 65 20 58 32 0a |e X1.#cr|eate X2.|
|00003d40| 23 0a 6c 73 20 3e 58 32 | 0a 23 63 72 65 61 74 65 |#.ls >X2|.#create|
|00003d50| 20 65 61 73 79 31 0a 23 | 63 72 65 61 74 65 20 65 | easy1.#|create e|
|00003d60| 61 73 79 65 72 0a 23 63 | 72 65 61 74 65 20 65 61 |asyer.#c|reate ea|
|00003d70| 73 79 72 69 64 65 72 0a | 23 63 72 65 61 74 65 20 |syrider.|#create |
|00003d80| 65 61 73 79 65 6e 6f 75 | 67 68 0a 23 75 73 65 72 |easyenou|gh.#user|
|00003d90| 0a 6c 73 20 3e 58 31 0a | 23 63 6d 70 20 58 31 20 |.ls >X1.|#cmp X1 |
|00003da0| 58 32 0a 23 6c 6f 67 0a | 23 6e 65 78 74 0a 31 33 |X2.#log.|#next.13|
|00003db0| 2e 31 65 0a 4c 31 33 2e | 31 65 00 00 00 00 00 00 |.1e.L13.|1e......|
|00003dc0| 00 00 cd 10 38 5f 09 01 | b4 81 00 00 00 01 23 70 |....8_..|......#p|
|00003dd0| 72 69 6e 74 0a 54 68 69 | 73 20 6f 6e 65 20 69 73 |rint.Thi|s one is|
|00003de0| 20 74 6f 75 67 68 65 72 | 20 74 68 61 6e 20 74 68 | tougher| than th|
|00003df0| 65 20 6c 61 73 74 20 6f | 6e 65 2e 20 54 68 65 72 |e last o|ne. Ther|
|00003e00| 65 20 61 72 65 0a 73 65 | 76 65 72 61 6c 20 66 69 |e are.se|veral fi|
|00003e10| 6c 65 73 20 69 6e 20 74 | 68 69 73 20 64 69 72 65 |les in t|his dire|
|00003e20| 63 74 6f 72 79 20 77 68 | 6f 73 65 20 6e 61 6d 65 |ctory wh|ose name|
|00003e30| 73 0a 62 65 67 69 6e 20 | 77 69 74 68 20 22 68 61 |s.begin |with "ha|
|00003e40| 72 64 22 2e 20 52 65 6d | 6f 76 65 20 74 68 65 6d |rd". Rem|ove them|
|00003e50| 2c 20 74 68 65 6e 20 74 | 79 70 65 20 22 72 65 61 |, then t|ype "rea|
|00003e60| 64 79 22 2e 0a 23 63 72 | 65 61 74 65 20 58 31 0a |dy"..#cr|eate X1.|
|00003e70| 23 63 72 65 61 74 65 20 | 58 32 0a 23 0a 6c 73 20 |#create |X2.#.ls |
|00003e80| 3e 58 32 0a 63 70 20 58 | 31 20 22 68 61 72 64 08 |>X2.cp X|1 "hard.|
|00003e90| 20 31 22 0a 63 70 20 58 | 31 20 22 68 61 72 64 08 | 1".cp X|1 "hard.|
|00003ea0| 20 65 72 22 0a 23 75 73 | 65 72 0a 6c 73 20 3e 58 | er".#us|er.ls >X|
|00003eb0| 31 0a 23 63 6d 70 20 58 | 31 20 58 32 0a 23 6c 6f |1.#cmp X|1 X2.#lo|
|00003ec0| 67 0a 23 6e 65 78 74 0a | 31 33 2e 31 66 0a 4c 31 |g.#next.|13.1f.L1|
|00003ed0| 33 2e 31 66 00 00 00 00 | 00 00 00 00 cd 10 3a 5f |3.1f....|......:_|
|00003ee0| 09 01 b4 81 00 00 0f 02 | 23 70 72 69 6e 74 0a 53 |........|#print.S|
|00003ef0| 75 70 70 6f 73 65 20 79 | 6f 75 20 68 61 76 65 20 |uppose y|ou have |
|00003f00| 74 77 6f 20 66 69 6c 65 | 73 20 6e 61 6d 65 64 20 |two file|s named |
|00003f10| 22 64 69 63 6b 22 20 61 | 6e 64 20 22 6a 61 6e 65 |"dick" a|nd "jane|
|00003f20| 22 2c 20 61 6e 64 20 79 | 6f 75 0a 77 61 6e 74 20 |", and y|ou.want |
|00003f30| 74 6f 20 69 6e 74 65 72 | 63 68 61 6e 67 65 20 74 |to inter|change t|
|00003f40| 68 65 6d 2c 20 73 6f 20 | 74 68 61 74 20 22 64 69 |hem, so |that "di|
|00003f50| 63 6b 22 20 63 6f 6e 74 | 61 69 6e 73 20 77 68 61 |ck" cont|ains wha|
|00003f60| 74 65 76 65 72 0a 77 61 | 73 20 6f 72 69 67 69 6e |tever.wa|s origin|
|00003f70| 61 6c 6c 79 20 69 6e 20 | 22 6a 61 6e 65 22 2c 20 |ally in |"jane", |
|00003f80| 61 6e 64 20 22 6a 61 6e | 65 22 20 63 6f 6e 74 61 |and "jan|e" conta|
|00003f90| 69 6e 73 20 77 68 61 74 | 20 77 61 73 20 69 6e 20 |ins what| was in |
|00003fa0| 22 64 69 63 6b 22 2e 0a | 57 69 6c 6c 20 74 68 69 |"dick"..|Will thi|
|00003fb0| 73 20 73 65 71 75 65 6e | 63 65 20 6f 66 20 63 6f |s sequen|ce of co|
|00003fc0| 6d 6d 61 6e 64 73 20 64 | 6f 20 74 68 65 20 6a 6f |mmands d|o the jo|
|00003fd0| 62 3f 0a 0a 6d 76 20 64 | 69 63 6b 20 6a 61 6e 65 |b?..mv d|ick jane|
|00003fe0| 0a 6d 76 20 6a 61 6e 65 | 20 64 69 63 6b 0a 0a 54 |.mv jane| dick..T|
|00003ff0| 68 65 72 65 20 61 72 65 | 20 74 77 6f 20 66 69 6c |here are| two fil|
|00004000| 65 73 20 6e 61 6d 65 64 | 20 22 6a 6f 68 6e 22 20 |es named| "john" |
|00004010| 61 6e 64 20 22 6d 61 72 | 79 22 0a 69 6e 20 74 68 |and "mar|y".in th|
|00004020| 69 73 20 64 69 72 65 63 | 74 6f 72 79 2c 20 69 66 |is direc|tory, if|
|00004030| 20 79 6f 75 20 77 69 73 | 68 20 74 6f 20 65 78 70 | you wis|h to exp|
|00004040| 65 72 69 6d 65 6e 74 2e | 0a 57 68 65 6e 20 79 6f |eriment.|.When yo|
|00004050| 75 20 68 61 76 65 20 64 | 65 63 69 64 65 64 2c 20 |u have d|ecided, |
|00004060| 74 79 70 65 20 79 65 73 | 20 6f 72 20 6e 6f 2e 0a |type yes| or no..|
|00004070| 23 63 72 65 61 74 65 20 | 6a 6f 68 6e 0a 74 68 69 |#create |john.thi|
|00004080| 73 20 69 73 20 6f 72 69 | 67 69 6e 61 6c 6c 79 20 |s is ori|ginally |
|00004090| 66 69 6c 65 20 6a 6f 68 | 6e 0a 23 63 72 65 61 74 |file joh|n.#creat|
|000040a0| 65 20 6d 61 72 79 0a 74 | 68 69 73 20 69 73 20 6f |e mary.t|his is o|
|000040b0| 72 69 67 69 6e 61 6c 6c | 79 20 66 69 6c 65 20 6d |riginall|y file m|
|000040c0| 61 72 79 0a 23 63 6f 70 | 79 69 6e 0a 23 75 73 65 |ary.#cop|yin.#use|
|000040d0| 72 0a 23 75 6e 63 6f 70 | 79 69 6e 0a 23 6d 61 74 |r.#uncop|yin.#mat|
|000040e0| 63 68 20 6e 6f 0a 23 6c | 6f 67 0a 23 6e 65 78 74 |ch no.#l|og.#next|
|000040f0| 0a 31 33 2e 31 67 0a 79 | 4c 31 33 2e 31 67 00 00 |.13.1g.y|L13.1g..|
|00004100| 00 00 00 00 00 00 cd 10 | 3d 5f 09 01 b4 81 00 00 |........|=_......|
|00004110| 7f 02 23 70 72 69 6e 74 | 0a 53 75 70 70 6f 73 65 |..#print|.Suppose|
|00004120| 20 74 68 61 74 20 77 65 | 20 72 65 61 6c 6c 79 20 | that we| really |
|00004130| 64 6f 20 77 61 6e 74 20 | 74 6f 20 69 6e 74 65 72 |do want |to inter|
|00004140| 63 68 61 6e 67 65 20 74 | 68 65 20 63 6f 6e 74 65 |change t|he conte|
|00004150| 6e 74 73 0a 6f 66 20 74 | 68 65 20 66 69 6c 65 73 |nts.of t|he files|
|00004160| 20 22 64 69 63 6b 22 20 | 61 6e 64 20 22 6a 61 6e | "dick" |and "jan|
|00004170| 65 22 2e 20 4f 6e 65 20 | 77 61 79 20 74 6f 20 64 |e". One |way to d|
|00004180| 6f 20 69 74 20 69 73 0a | 74 6f 20 6d 6f 76 65 20 |o it is.|to move |
|00004190| 74 68 65 20 63 6f 6e 74 | 65 6e 74 73 20 6f 66 20 |the cont|ents of |
|000041a0| 22 64 69 63 6b 22 20 69 | 6e 74 6f 20 73 6f 6d 65 |"dick" i|nto some|
|000041b0| 20 74 65 6d 70 6f 72 61 | 72 79 20 66 69 6c 65 2c | tempora|ry file,|
|000041c0| 0a 74 68 65 6e 20 6d 6f | 76 65 20 22 6a 61 6e 65 |.then mo|ve "jane|
|000041d0| 22 20 6f 6e 74 6f 20 22 | 64 69 63 6b 22 20 28 77 |" onto "|dick" (w|
|000041e0| 68 69 63 68 20 6f 66 20 | 63 6f 75 72 73 65 20 63 |hich of |course c|
|000041f0| 6c 6f 62 62 65 72 73 0a | 74 68 65 20 6f 6c 64 20 |lobbers.|the old |
|00004200| 63 6f 6e 74 65 6e 74 73 | 20 6f 66 20 22 64 69 63 |contents| of "dic|
|00004210| 6b 22 2c 20 62 75 74 20 | 77 65 20 73 61 76 65 64 |k", but |we saved|
|00004220| 20 74 68 65 6d 20 61 6c | 72 65 61 64 79 29 2c 0a | them al|ready),.|
|00004230| 74 68 65 6e 20 66 69 6e | 61 6c 6c 79 20 74 6f 20 |then fin|ally to |
|00004240| 6d 6f 76 65 20 74 68 65 | 20 74 65 6d 70 6f 72 61 |move the| tempora|
|00004250| 72 79 20 63 6f 70 79 20 | 6f 66 20 22 64 69 63 6b |ry copy |of "dick|
|00004260| 22 20 74 6f 0a 22 6a 61 | 6e 65 22 2e 20 54 68 65 |" to."ja|ne". The|
|00004270| 72 65 20 61 72 65 20 74 | 77 6f 20 66 69 6c 65 73 |re are t|wo files|
|00004280| 20 6e 61 6d 65 64 20 22 | 64 69 63 6b 22 20 61 6e | named "|dick" an|
|00004290| 64 20 22 6a 61 6e 65 22 | 20 69 6e 20 74 68 69 73 |d "jane"| in this|
|000042a0| 0a 64 69 72 65 63 74 6f | 72 79 2e 20 49 6e 74 65 |.directo|ry. Inte|
|000042b0| 72 63 68 61 6e 67 65 20 | 74 68 65 69 72 20 63 6f |rchange |their co|
|000042c0| 6e 74 65 6e 74 73 2c 20 | 74 68 65 6e 20 74 79 70 |ntents, |then typ|
|000042d0| 65 20 22 72 65 61 64 79 | 22 2e 0a 23 63 72 65 61 |e "ready|"..#crea|
|000042e0| 74 65 20 52 65 66 0a 73 | 68 6f 72 74 20 66 69 6c |te Ref.s|hort fil|
|000042f0| 65 20 66 6f 72 20 64 69 | 63 6b 0a 23 63 72 65 61 |e for di|ck.#crea|
|00004300| 74 65 20 64 69 63 6b 0a | 73 68 6f 72 74 20 66 69 |te dick.|short fi|
|00004310| 6c 65 20 66 6f 72 20 64 | 69 63 6b 0a 23 63 72 65 |le for d|ick.#cre|
|00004320| 61 74 65 20 6a 61 6e 65 | 0a 61 6e 6f 74 68 65 72 |ate jane|.another|
|00004330| 20 66 69 6c 65 20 66 6f | 72 20 6a 61 6e 65 0a 23 | file fo|r jane.#|
|00004340| 63 72 65 61 74 65 20 52 | 65 66 31 0a 61 6e 6f 74 |create R|ef1.anot|
|00004350| 68 65 72 20 66 69 6c 65 | 20 66 6f 72 20 6a 61 6e |her file| for jan|
|00004360| 65 0a 23 75 73 65 72 0a | 63 6d 70 20 2d 73 20 6a |e.#user.|cmp -s j|
|00004370| 61 6e 65 20 52 65 66 20 | 26 26 20 63 6d 70 20 2d |ane Ref |&& cmp -|
|00004380| 73 20 64 69 63 6b 20 52 | 65 66 31 0a 23 6c 6f 67 |s dick R|ef1.#log|
|00004390| 0a 68 4c 32 2e 31 61 00 | 00 00 00 00 00 00 00 00 |.hL2.1a.|........|
|000043a0| e6 10 dd 85 09 01 b4 81 | 00 00 f8 01 23 70 72 69 |........|....#pri|
|000043b0| 6e 74 0a 54 68 65 20 22 | 6d 76 22 20 63 6f 6d 6d |nt.The "|mv" comm|
|000043c0| 61 6e 64 20 63 68 61 6e | 67 65 73 20 74 68 65 20 |and chan|ges the |
|000043d0| 6e 61 6d 65 73 20 6f 66 | 20 66 69 6c 65 73 2e 0a |names of| files..|
|000043e0| 46 6f 72 20 65 78 61 6d | 70 6c 65 2c 20 22 6d 76 |For exam|ple, "mv|
|000043f0| 20 62 6f 62 20 62 69 6c | 6c 22 20 63 68 61 6e 67 | bob bil|l" chang|
|00004400| 65 73 20 74 68 65 20 6e | 61 6d 65 0a 6f 66 20 66 |es the n|ame.of f|
|00004410| 69 6c 65 20 22 62 6f 62 | 22 20 74 6f 20 62 65 20 |ile "bob|" to be |
|00004420| 22 62 69 6c 6c 22 2e 20 | 20 49 66 20 74 68 65 72 |"bill". | If ther|
|00004430| 65 20 77 61 73 20 61 6c | 72 65 61 64 79 0a 61 20 |e was al|ready.a |
|00004440| 66 69 6c 65 20 6e 61 6d | 65 64 20 22 62 69 6c 6c |file nam|ed "bill|
|00004450| 22 2c 20 74 68 65 20 6f | 6c 64 20 76 65 72 73 69 |", the o|ld versi|
|00004460| 6f 6e 20 69 73 20 64 65 | 73 74 72 6f 79 65 64 2e |on is de|stroyed.|
|00004470| 0a 0a 54 68 65 72 65 20 | 69 73 20 61 20 66 69 6c |..There |is a fil|
|00004480| 65 20 69 6e 0a 74 68 65 | 20 63 75 72 72 65 6e 74 |e in.the| current|
|00004490| 20 64 69 72 65 63 74 6f | 72 79 20 77 68 6f 73 65 | directo|ry whose|
|000044a0| 20 6e 61 6d 65 20 62 65 | 67 69 6e 73 20 77 69 74 | name be|gins wit|
|000044b0| 68 0a 74 68 65 20 6c 65 | 74 74 65 72 20 22 67 22 |h.the le|tter "g"|
|000044c0| 2c 20 6c 69 6b 65 20 22 | 67 72 61 6e 74 22 20 6f |, like "|grant" o|
|000044d0| 72 20 22 67 72 6f 76 65 | 72 22 2e 0a 46 69 6e 64 |r "grove|r"..Find|
|000044e0| 20 6f 75 74 20 77 68 61 | 74 20 74 68 65 20 66 69 | out wha|t the fi|
|000044f0| 6c 65 20 6e 61 6d 65 20 | 72 65 61 6c 6c 79 20 69 |le name |really i|
|00004500| 73 2c 20 61 6e 64 0a 74 | 68 65 6e 20 63 68 61 6e |s, and.t|hen chan|
|00004510| 67 65 20 74 68 61 74 20 | 66 69 6c 65 20 74 6f 20 |ge that |file to |
|00004520| 68 61 76 65 20 74 68 65 | 20 6e 61 6d 65 20 22 6a |have the| name "j|
|00004530| 6f 68 6e 22 2e 0a 54 68 | 65 6e 20 74 79 70 65 20 |ohn"..Th|en type |
|00004540| 22 72 65 61 64 79 22 2e | 0a 23 63 72 65 61 74 65 |"ready".|.#create|
|00004550| 20 67 65 6f 72 67 65 0a | 74 68 69 73 20 73 68 6f | george.|this sho|
|00004560| 75 6c 64 20 62 65 63 6f | 6d 65 20 6a 6f 68 6e 0a |uld beco|me john.|
|00004570| 23 75 73 65 72 0a 74 65 | 73 74 20 2d 72 20 6a 6f |#user.te|st -r jo|
|00004580| 68 6e 0a 23 6c 6f 67 0a | 23 6e 65 78 74 0a 33 2e |hn.#log.|#next.3.|
|00004590| 31 61 20 31 30 0a 33 2e | 32 61 20 35 0a 33 2e 33 |1a 10.3.|2a 5.3.3|
|000045a0| 61 20 32 0a 4c 32 2e 32 | 61 00 00 00 00 00 00 00 |a 2.L2.2|a.......|
|000045b0| 00 00 e9 10 a7 a9 09 01 | b4 81 00 00 a4 01 23 70 |........|......#p|
|000045c0| 72 69 6e 74 0a 54 68 65 | 20 22 6d 76 22 20 63 6f |rint.The| "mv" co|
|000045d0| 6d 6d 61 6e 64 20 63 68 | 61 6e 67 65 73 20 74 68 |mmand ch|anges th|
|000045e0| 65 20 6e 61 6d 65 73 20 | 6f 66 20 66 69 6c 65 73 |e names |of files|
|000045f0| 2e 0a 46 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 22 |..For ex|ample, "|
|00004600| 6d 76 20 74 68 6f 6d 61 | 73 20 6a 61 6d 65 73 22 |mv thoma|s james"|
|00004610| 20 63 68 61 6e 67 65 73 | 20 74 68 65 0a 6e 61 6d | changes| the.nam|
|00004620| 65 20 6f 66 20 74 68 65 | 20 66 69 6c 65 20 22 74 |e of the| file "t|
|00004630| 68 6f 6d 61 73 22 20 74 | 6f 20 62 65 20 22 6a 61 |homas" t|o be "ja|
|00004640| 6d 65 73 22 2e 0a 0a 54 | 68 65 72 65 20 69 73 20 |mes"...T|here is |
|00004650| 61 20 66 69 6c 65 20 69 | 6e 20 74 68 65 20 63 75 |a file i|n the cu|
|00004660| 72 72 65 6e 74 20 64 69 | 72 65 63 74 6f 72 79 20 |rrent di|rectory |
|00004670| 6e 61 6d 65 64 0a 22 74 | 68 6f 6d 61 73 22 2e 20 |named."t|homas". |
|00004680| 20 43 68 61 6e 67 65 20 | 74 68 61 74 20 66 69 6c | Change |that fil|
|00004690| 65 20 74 6f 20 68 61 76 | 65 20 74 68 65 0a 6e 61 |e to hav|e the.na|
|000046a0| 6d 65 20 22 6a 61 6d 65 | 73 22 2e 20 20 54 68 65 |me "jame|s". The|
|000046b0| 6e 20 74 79 70 65 20 22 | 72 65 61 64 79 22 2e 0a |n type "|ready"..|
|000046c0| 28 54 68 65 20 22 6d 76 | 22 20 63 6f 6d 6d 61 6e |(The "mv|" comman|
|000046d0| 64 2c 20 62 79 20 74 68 | 65 20 77 61 79 2c 20 69 |d, by th|e way, i|
|000046e0| 73 20 6c 69 6b 65 20 6d | 61 6e 79 0a 55 4e 49 58 |s like m|any.UNIX|
|000046f0| 20 63 6f 6d 6d 61 6e 64 | 73 20 69 6e 20 74 68 61 | command|s in tha|
|00004700| 74 20 69 74 20 69 73 20 | 73 69 6c 65 6e 74 20 75 |t it is |silent u|
|00004710| 6e 6c 65 73 73 20 74 68 | 65 72 65 20 69 73 20 61 |nless th|ere is a|
|00004720| 6e 20 65 72 72 6f 72 2e | 29 0a 23 63 72 65 61 74 |n error.|).#creat|
|00004730| 65 20 74 68 6f 6d 61 73 | 0a 78 78 0a 23 75 73 65 |e thomas|.xx.#use|
|00004740| 72 0a 74 65 73 74 20 2d | 72 20 6a 61 6d 65 73 0a |r.test -|r james.|
|00004750| 23 6c 6f 67 0a 23 6e 65 | 78 74 0a 32 2e 32 62 20 |#log.#ne|xt.2.2b |
|00004760| 35 0a 4c 32 2e 32 62 00 | 00 00 00 00 00 00 00 00 |5.L2.2b.|........|
|00004770| e9 10 c4 a9 09 01 b4 81 | 00 00 5d 02 23 70 72 69 |........|..].#pri|
|00004780| 6e 74 0a 4e 6f 77 20 79 | 6f 75 72 20 64 69 72 65 |nt.Now y|our dire|
|00004790| 63 74 6f 72 79 20 63 6f | 6e 74 61 69 6e 73 20 61 |ctory co|ntains a|
|000047a0| 20 66 69 6c 65 20 77 69 | 74 68 20 61 20 6e 61 6d | file wi|th a nam|
|000047b0| 65 0a 74 68 61 74 20 73 | 74 61 72 74 73 20 77 69 |e.that s|tarts wi|
|000047c0| 74 68 20 22 61 22 20 28 | 6c 69 6b 65 20 22 61 64 |th "a" (|like "ad|
|000047d0| 61 6d 22 2c 20 22 61 72 | 74 68 75 72 22 2c 20 65 |am", "ar|thur", e|
|000047e0| 74 63 2e 29 2e 0a 46 69 | 6e 64 20 69 74 20 61 6e |tc.)..Fi|nd it an|
|000047f0| 64 20 63 68 61 6e 67 65 | 20 69 74 73 20 6e 61 6d |d change| its nam|
|00004800| 65 20 74 6f 20 22 6d 61 | 72 74 69 6e 22 2e 0a 54 |e to "ma|rtin"..T|
|00004810| 68 65 6e 20 74 79 70 65 | 20 22 72 65 61 64 79 22 |hen type| "ready"|
|00004820| 2e 0a 42 79 20 74 68 65 | 20 77 61 79 2c 20 69 66 |..By the| way, if|
|00004830| 20 74 68 65 72 65 20 77 | 61 73 20 61 6c 72 65 61 | there w|as alrea|
|00004840| 64 79 20 61 20 66 69 6c | 65 20 61 72 6f 75 6e 64 |dy a fil|e around|
|00004850| 0a 6e 61 6d 65 64 20 22 | 6d 61 72 74 69 6e 22 2c |.named "|martin",|
|00004860| 20 74 68 65 20 6f 6c 64 | 20 76 65 72 73 69 6f 6e | the old| version|
|00004870| 20 69 73 20 63 6c 6f 62 | 62 65 72 65 64 0a 62 79 | is clob|bered.by|
|00004880| 20 74 68 65 20 6e 65 77 | 20 6f 6e 65 2e 0a 23 63 | the new| one..#c|
|00004890| 72 65 61 74 65 20 61 6e | 64 72 65 77 0a 73 74 75 |reate an|drew.stu|
|000048a0| 66 66 0a 23 75 73 65 72 | 0a 74 65 73 74 20 2d 72 |ff.#user|.test -r|
|000048b0| 20 6d 61 72 74 69 6e 0a | 23 66 61 69 6c 0a 44 6f | martin.|#fail.Do|
|000048c0| 20 79 6f 75 20 72 65 6d | 65 6d 62 65 72 20 74 68 | you rem|ember th|
|000048d0| 61 74 20 74 68 65 20 22 | 6c 73 22 20 63 6f 6d 6d |at the "|ls" comm|
|000048e0| 61 6e 64 20 77 69 6c 6c | 0a 74 65 6c 6c 20 79 6f |and will|.tell yo|
|000048f0| 75 20 74 68 65 20 6e 61 | 6d 65 73 20 6f 66 20 74 |u the na|mes of t|
|00004900| 68 65 20 66 69 6c 65 73 | 20 69 6e 20 74 68 65 20 |he files| in the |
|00004910| 63 75 72 72 65 6e 74 0a | 64 69 72 65 63 74 6f 72 |current.|director|
|00004920| 79 3f 20 54 68 75 73 20 | 79 6f 75 20 63 61 6e 20 |y? Thus |you can |
|00004930| 75 73 65 20 22 6c 73 22 | 20 74 6f 20 74 65 6c 6c |use "ls"| to tell|
|00004940| 20 79 6f 75 0a 77 68 61 | 74 20 79 6f 75 72 20 66 | you.wha|t your f|
|00004950| 69 6c 65 20 6e 61 6d 65 | 73 20 61 72 65 3b 20 61 |ile name|s are; a|
|00004960| 6e 64 20 74 68 65 6e 20 | 79 6f 75 20 63 61 6e 20 |nd then |you can |
|00004970| 75 73 65 0a 22 6d 76 22 | 20 74 6f 20 63 68 61 6e |use."mv"| to chan|
|00004980| 67 65 20 74 68 65 20 6e | 61 6d 65 20 6f 66 20 74 |ge the n|ame of t|
|00004990| 68 65 20 66 69 6c 65 0a | 62 65 67 69 6e 6e 69 6e |he file.|beginnin|
|000049a0| 67 20 77 69 74 68 20 22 | 61 22 20 74 6f 20 22 6d |g with "|a" to "m|
|000049b0| 61 72 74 69 6e 22 2e 0a | 23 6c 6f 67 0a 23 6e 65 |artin"..|#log.#ne|
|000049c0| 78 74 0a 33 2e 31 61 20 | 31 30 0a 33 2e 32 61 20 |xt.3.1a |10.3.2a |
|000049d0| 35 0a 33 2e 33 61 20 32 | 0a 68 4c 33 2e 31 61 00 |5.3.3a 2|.hL3.1a.|
|000049e0| 00 00 00 00 00 00 00 00 | ea 10 64 7a 09 01 b4 81 |........|..dz....|
|000049f0| 00 00 c2 02 23 70 72 69 | 6e 74 0a 54 68 65 20 22 |....#pri|nt.The "|
|00004a00| 63 61 74 22 20 63 6f 6d | 6d 61 6e 64 20 70 72 69 |cat" com|mand pri|
|00004a10| 6e 74 73 20 74 68 65 20 | 63 6f 6e 74 65 6e 74 73 |nts the |contents|
|00004a20| 20 6f 66 20 6f 6e 65 20 | 6f 72 20 6d 6f 72 65 20 | of one |or more |
|00004a30| 66 69 6c 65 73 2e 0a 49 | 6e 20 66 61 63 74 2c 20 |files..I|n fact, |
|00004a40| 69 74 20 69 73 20 6e 61 | 6d 65 64 20 22 63 61 74 |it is na|med "cat|
|00004a50| 22 20 61 73 20 61 6e 20 | 61 62 62 72 65 76 69 61 |" as an |abbrevia|
|00004a60| 74 69 6f 6e 0a 66 6f 72 | 20 22 63 6f 6e 63 61 74 |tion.for| "concat|
|00004a70| 65 6e 61 74 65 22 2e 20 | 20 54 6f 20 70 72 69 6e |enate". | To prin|
|00004a80| 74 20 74 68 65 20 66 69 | 6c 65 73 20 6e 61 6d 65 |t the fi|les name|
|00004a90| 64 20 22 64 6f 67 22 0a | 61 6e 64 20 22 6d 6f 75 |d "dog".|and "mou|
|00004aa0| 73 65 22 20 69 6e 20 73 | 75 63 63 65 73 73 69 6f |se" in s|uccessio|
|00004ab0| 6e 2c 20 79 6f 75 20 63 | 6f 75 6c 64 20 74 79 70 |n, you c|ould typ|
|00004ac0| 65 20 65 69 74 68 65 72 | 0a 20 20 63 61 74 20 64 |e either|. cat d|
|00004ad0| 6f 67 0a 20 20 63 61 74 | 20 6d 6f 75 73 65 0a 6f |og. cat| mouse.o|
|00004ae0| 72 20 6a 75 73 74 0a 20 | 20 63 61 74 20 64 6f 67 |r just. | cat dog|
|00004af0| 20 6d 6f 75 73 65 0a 49 | 66 20 79 6f 75 20 70 72 | mouse.I|f you pr|
|00004b00| 69 6e 74 20 74 68 65 6d | 20 77 69 74 68 20 6f 6e |int them| with on|
|00004b10| 65 20 63 6f 6d 6d 61 6e | 64 2c 0a 74 68 65 20 63 |e comman|d,.the c|
|00004b20| 6f 6e 74 65 6e 74 73 20 | 61 72 65 20 70 72 69 6e |ontents |are prin|
|00004b30| 74 65 64 20 69 6e 20 73 | 65 71 75 65 6e 63 65 20 |ted in s|equence |
|00004b40| 77 69 74 68 20 6e 6f 74 | 68 69 6e 67 0a 62 65 74 |with not|hing.bet|
|00004b50| 77 65 65 6e 20 74 68 65 | 6d 2e 0a 0a 48 6f 77 20 |ween the|m...How |
|00004b60| 6d 61 6e 79 20 6c 69 6e | 65 73 20 61 72 65 20 74 |many lin|es are t|
|00004b70| 68 65 72 65 20 69 6e 20 | 61 6c 6c 20 74 68 65 20 |here in |all the |
|00004b80| 66 69 6c 65 73 0a 77 68 | 6f 73 65 20 6e 61 6d 65 |files.wh|ose name|
|00004b90| 73 20 62 65 67 69 6e 20 | 77 69 74 68 20 22 62 22 |s begin |with "b"|
|00004ba0| 3f 20 20 46 69 6e 64 20 | 6f 75 74 2c 20 74 68 65 |? Find |out, the|
|00004bb0| 6e 20 74 79 70 65 0a 22 | 61 6e 73 77 65 72 20 4e |n type."|answer N|
|00004bc0| 22 20 77 68 65 72 65 20 | 4e 20 69 73 20 74 68 65 |" where |N is the|
|00004bd0| 20 74 6f 74 61 6c 20 6e | 75 6d 62 65 72 20 6f 66 | total n|umber of|
|00004be0| 20 6c 69 6e 65 73 2e 0a | 23 63 72 65 61 74 65 20 | lines..|#create |
|00004bf0| 62 65 6e 0a 74 68 65 20 | 66 69 6c 65 20 62 65 6e |ben.the |file ben|
|00004c00| 20 68 61 73 0a 61 20 74 | 6f 74 61 6c 20 6f 66 20 | has.a t|otal of |
|00004c10| 74 68 72 65 65 0a 73 68 | 6f 72 74 20 6c 69 6e 65 |three.sh|ort line|
|00004c20| 73 2e 0a 23 63 72 65 61 | 74 65 20 62 65 72 6e 69 |s..#crea|te berni|
|00004c30| 65 0a 74 68 69 73 20 66 | 69 6c 65 20 68 61 73 0a |e.this f|ile has.|
|00004c40| 74 77 6f 20 6c 69 6e 65 | 73 2e 0a 23 63 72 65 61 |two line|s..#crea|
|00004c50| 74 65 20 62 72 75 63 65 | 0a 6f 6e 6c 79 20 6f 6e |te bruce|.only on|
|00004c60| 65 20 6c 69 6e 65 20 68 | 65 72 65 2e 0a 23 63 6f |e line h|ere..#co|
|00004c70| 70 79 69 6e 0a 23 75 73 | 65 72 0a 23 75 6e 63 6f |pyin.#us|er.#unco|
|00004c80| 70 79 69 6e 0a 23 6d 61 | 74 63 68 20 36 0a 23 6c |pyin.#ma|tch 6.#l|
|00004c90| 6f 67 0a 23 6e 65 78 74 | 0a 34 2e 31 61 20 20 31 |og.#next|.4.1a 1|
|00004ca0| 30 0a 34 2e 32 61 20 20 | 20 20 35 0a 34 2e 33 61 |0.4.2a | 5.4.3a|
|00004cb0| 20 20 20 20 32 0a 4c 33 | 2e 32 61 00 00 00 00 00 | 2.L3|.2a.....|
|00004cc0| 00 00 00 00 e9 10 3c 3f | 09 01 b4 81 00 00 68 02 |......<?|......h.|
|00004cd0| 23 70 72 69 6e 74 0a 54 | 68 65 20 63 6f 6d 6d 61 |#print.T|he comma|
|00004ce0| 6e 64 20 22 63 61 74 22 | 20 77 69 6c 6c 20 70 72 |nd "cat"| will pr|
|00004cf0| 69 6e 74 20 66 69 6c 65 | 73 2e 20 20 46 6f 72 20 |int file|s. For |
|00004d00| 65 78 61 6d 70 6c 65 2c | 20 79 6f 75 0a 63 61 6e |example,| you.can|
|00004d10| 20 70 72 69 6e 74 20 74 | 68 65 20 66 69 6c 65 20 | print t|he file |
|00004d20| 6e 61 6d 65 64 20 22 66 | 6f 6f 64 22 20 62 79 20 |named "f|ood" by |
|00004d30| 74 79 70 69 6e 67 20 22 | 63 61 74 20 66 6f 6f 64 |typing "|cat food|
|00004d40| 22 2e 0a 59 6f 75 72 20 | 63 75 72 72 65 6e 74 20 |"..Your |current |
|00004d50| 64 69 72 65 63 74 6f 72 | 79 20 68 61 73 20 61 20 |director|y has a |
|00004d60| 66 69 6c 65 20 6e 61 6d | 65 64 20 22 73 61 6d 22 |file nam|ed "sam"|
|00004d70| 20 61 6e 64 20 61 0a 66 | 69 6c 65 20 6e 61 6d 65 | and a.f|ile name|
|00004d80| 64 20 22 73 74 65 76 65 | 22 2e 20 20 57 68 69 63 |d "steve|". Whic|
|00004d90| 68 20 69 73 20 6c 6f 6e | 67 65 72 3f 20 20 46 69 |h is lon|ger? Fi|
|00004da0| 6e 64 20 6f 75 74 20 61 | 6e 64 0a 74 79 70 65 20 |nd out a|nd.type |
|00004db0| 22 61 6e 73 77 65 72 20 | 73 61 6d 22 20 6f 72 20 |"answer |sam" or |
|00004dc0| 22 61 6e 73 77 65 72 20 | 73 74 65 76 65 22 2c 20 |"answer |steve", |
|00004dd0| 67 69 76 69 6e 67 20 74 | 68 65 20 6e 61 6d 65 0a |giving t|he name.|
|00004de0| 6f 66 20 74 68 65 20 6c | 6f 6e 67 65 72 20 66 69 |of the l|onger fi|
|00004df0| 6c 65 2e 0a 23 63 72 65 | 61 74 65 20 73 61 6d 0a |le..#cre|ate sam.|
|00004e00| 74 68 69 73 20 69 73 20 | 74 68 65 20 66 69 6c 65 |this is |the file|
|00004e10| 20 73 61 6d 2e 20 20 69 | 74 20 63 6f 6e 74 61 69 | sam. i|t contai|
|00004e20| 6e 73 0a 6f 6e 6c 79 20 | 74 77 6f 20 6c 69 6e 65 |ns.only |two line|
|00004e30| 73 20 6f 66 20 74 65 78 | 74 2e 0a 23 63 72 65 61 |s of tex|t..#crea|
|00004e40| 74 65 20 73 74 65 76 65 | 0a 74 68 69 73 20 66 69 |te steve|.this fi|
|00004e50| 6c 65 20 69 73 20 6e 61 | 6d 65 64 20 73 74 65 76 |le is na|med stev|
|00004e60| 65 2e 20 20 69 74 20 69 | 73 20 61 0a 66 69 6c 65 |e. it i|s a.file|
|00004e70| 20 77 68 69 63 68 20 63 | 6f 6e 74 61 69 6e 73 20 | which c|ontains |
|00004e80| 66 69 76 65 20 6c 69 6e | 65 73 20 6f 66 20 74 65 |five lin|es of te|
|00004e90| 78 74 2e 0a 74 68 69 73 | 20 69 73 20 6f 66 20 63 |xt..this| is of c|
|00004ea0| 6f 75 72 73 65 20 61 20 | 76 65 72 79 20 73 68 6f |ourse a |very sho|
|00004eb0| 72 74 20 66 69 6c 65 0a | 62 79 20 61 6e 79 20 6f |rt file.|by any o|
|00004ec0| 72 64 69 6e 61 72 79 20 | 73 74 61 6e 64 61 72 64 |rdinary |standard|
|00004ed0| 73 2c 20 61 6c 74 68 6f | 75 67 68 0a 6f 6e 20 55 |s, altho|ugh.on U|
|00004ee0| 4e 49 58 20 6d 6f 73 74 | 20 66 69 6c 65 73 20 61 |NIX most| files a|
|00004ef0| 72 65 20 72 61 74 68 65 | 72 20 73 68 6f 72 74 2e |re rathe|r short.|
|00004f00| 0a 23 63 6f 70 79 69 6e | 0a 23 75 73 65 72 0a 23 |.#copyin|.#user.#|
|00004f10| 75 6e 63 6f 70 79 69 6e | 0a 23 6d 61 74 63 68 20 |uncopyin|.#match |
|00004f20| 73 74 65 76 65 0a 23 6c | 6f 67 0a 23 6e 65 78 74 |steve.#l|og.#next|
|00004f30| 0a 33 2e 32 62 20 35 0a | 4c 33 2e 32 62 00 00 00 |.3.2b 5.|L3.2b...|
|00004f40| 00 00 00 00 00 00 e9 10 | fb a9 09 01 b4 81 00 00 |........|........|
|00004f50| ed 02 23 70 72 69 6e 74 | 0a 54 68 65 20 22 63 61 |..#print|.The "ca|
|00004f60| 74 22 20 63 6f 6d 6d 61 | 6e 64 20 63 61 6e 20 61 |t" comma|nd can a|
|00004f70| 6c 73 6f 20 70 72 69 6e | 74 20 73 65 76 65 72 61 |lso prin|t severa|
|00004f80| 6c 20 66 69 6c 65 73 0a | 61 74 20 6f 6e 63 65 2e |l files.|at once.|
|00004f90| 20 20 49 6e 20 66 61 63 | 74 2c 20 69 74 20 69 73 | In fac|t, it is|
|00004fa0| 20 6e 61 6d 65 64 20 22 | 63 61 74 22 20 61 73 20 | named "|cat" as |
|00004fb0| 61 6e 20 61 62 62 72 65 | 76 69 61 74 69 6f 6e 0a |an abbre|viation.|
|00004fc0| 66 6f 72 20 22 63 6f 6e | 63 61 74 65 6e 61 74 65 |for "con|catenate|
|00004fd0| 22 2e 20 20 54 6f 20 70 | 72 69 6e 74 20 74 68 65 |". To p|rint the|
|00004fe0| 20 66 69 6c 65 73 20 6e | 61 6d 65 64 20 22 64 6f | files n|amed "do|
|00004ff0| 67 22 0a 61 6e 64 20 22 | 6d 6f 75 73 65 22 20 69 |g".and "|mouse" i|
|00005000| 6e 20 73 75 63 63 65 73 | 73 69 6f 6e 2c 20 79 6f |n succes|sion, yo|
|00005010| 75 20 63 6f 75 6c 64 20 | 65 69 74 68 65 72 0a 74 |u could |either.t|
|00005020| 79 70 65 3a 0a 20 20 63 | 61 74 20 64 6f 67 0a 20 |ype:. c|at dog. |
|00005030| 20 63 61 74 20 6d 6f 75 | 73 65 0a 6f 72 20 6a 75 | cat mou|se.or ju|
|00005040| 73 74 0a 20 20 63 61 74 | 20 64 6f 67 20 6d 6f 75 |st. cat| dog mou|
|00005050| 73 65 0a 49 66 20 79 6f | 75 20 70 72 69 6e 74 20 |se.If yo|u print |
|00005060| 74 68 65 6d 20 77 69 74 | 68 20 6f 6e 65 20 63 6f |them wit|h one co|
|00005070| 6d 6d 61 6e 64 2c 0a 74 | 68 65 20 66 69 6c 65 73 |mmand,.t|he files|
|00005080| 20 61 72 65 20 6c 69 73 | 74 65 64 20 69 6e 20 73 | are lis|ted in s|
|00005090| 65 71 75 65 6e 63 65 20 | 77 69 74 68 20 6e 6f 74 |equence |with not|
|000050a0| 68 69 6e 67 0a 62 65 74 | 77 65 65 6e 20 74 68 65 |hing.bet|ween the|
|000050b0| 6d 2e 0a 0a 54 68 69 73 | 20 64 69 72 65 63 74 6f |m...This| directo|
|000050c0| 72 79 20 63 6f 6e 74 61 | 69 6e 73 20 74 77 6f 20 |ry conta|ins two |
|000050d0| 66 69 6c 65 73 0a 6e 61 | 6d 65 64 20 22 63 68 65 |files.na|med "che|
|000050e0| 73 74 65 72 22 20 61 6e | 64 20 22 63 68 61 72 6c |ster" an|d "charl|
|000050f0| 65 79 22 2e 20 20 57 68 | 61 74 20 69 73 20 74 68 |ey". Wh|at is th|
|00005100| 65 0a 6c 6f 6e 67 65 73 | 74 20 77 6f 72 64 20 69 |e.longes|t word i|
|00005110| 6e 20 65 69 74 68 65 72 | 20 66 69 6c 65 3f 20 20 |n either| file? |
|00005120| 54 79 70 65 20 22 61 6e | 73 77 65 72 20 57 4f 52 |Type "an|swer WOR|
|00005130| 44 22 0a 77 68 65 72 65 | 20 57 4f 52 44 20 69 73 |D".where| WORD is|
|00005140| 20 74 68 65 20 6c 6f 6e | 67 65 73 74 20 77 6f 72 | the lon|gest wor|
|00005150| 64 20 79 6f 75 20 66 69 | 6e 64 2e 0a 23 63 72 65 |d you fi|nd..#cre|
|00005160| 61 74 65 20 63 68 61 72 | 6c 65 79 0a 6d 6f 73 74 |ate char|ley.most|
|00005170| 20 6f 66 20 74 68 69 73 | 20 66 69 6c 65 20 69 73 | of this| file is|
|00005180| 20 73 68 6f 72 74 20 62 | 75 74 20 61 74 20 6f 6e | short b|ut at on|
|00005190| 65 20 70 6c 61 63 65 0a | 74 68 65 72 65 20 69 73 |e place.|there is|
|000051a0| 20 61 20 73 75 72 70 72 | 69 73 69 6e 67 6c 79 20 | a surpr|isingly |
|000051b0| 6c 6f 6e 67 20 77 6f 72 | 64 2e 0a 23 63 72 65 61 |long wor|d..#crea|
|000051c0| 74 65 20 63 68 65 73 74 | 65 72 0a 61 6e 64 20 6f |te chest|er.and o|
|000051d0| 66 20 74 68 65 20 62 75 | 74 20 68 65 72 65 20 6e |f the bu|t here n|
|000051e0| 6f 77 20 73 74 6f 70 20 | 67 6f 0a 23 63 6f 70 79 |ow stop |go.#copy|
|000051f0| 69 6e 0a 23 75 73 65 72 | 0a 23 75 6e 63 6f 70 79 |in.#user|.#uncopy|
|00005200| 69 6e 0a 23 6d 61 74 63 | 68 20 73 75 72 70 72 69 |in.#matc|h surpri|
|00005210| 73 69 6e 67 6c 79 0a 23 | 6c 6f 67 0a 23 6e 65 78 |singly.#|log.#nex|
|00005220| 74 0a 34 2e 31 61 20 20 | 31 30 0a 34 2e 32 61 20 |t.4.1a |10.4.2a |
|00005230| 20 20 20 35 0a 34 2e 33 | 61 20 20 20 20 32 0a 75 | 5.4.3|a 2.u|
|00005240| 4c 33 2e 33 61 00 00 00 | 00 00 00 00 00 00 e9 10 |L3.3a...|........|
|00005250| eb b0 09 01 b4 81 00 00 | 68 01 23 70 72 69 6e 74 |........|h.#print|
|00005260| 0a 41 20 66 69 6c 65 20 | 63 61 6e 20 62 65 20 70 |.A file |can be p|
|00005270| 72 69 6e 74 65 64 20 6f | 6e 20 79 6f 75 72 20 74 |rinted o|n your t|
|00005280| 65 72 6d 69 6e 61 6c 0a | 62 79 20 75 73 69 6e 67 |erminal.|by using|
|00005290| 20 74 68 65 20 22 63 61 | 74 22 20 63 6f 6d 6d 61 | the "ca|t" comma|
|000052a0| 6e 64 2e 20 20 4a 75 73 | 74 20 73 61 79 0a 22 63 |nd. Jus|t say."c|
|000052b0| 61 74 20 66 69 6c 65 22 | 20 77 68 65 72 65 20 22 |at file"| where "|
|000052c0| 66 69 6c 65 22 20 69 73 | 20 74 68 65 20 66 69 6c |file" is| the fil|
|000052d0| 65 20 6e 61 6d 65 2e 0a | 46 6f 72 20 65 78 61 6d |e name..|For exam|
|000052e0| 70 6c 65 2c 20 74 68 65 | 72 65 20 69 73 20 61 20 |ple, the|re is a |
|000052f0| 66 69 6c 65 20 6e 61 6d | 65 64 0a 22 66 6f 6f 64 |file nam|ed."food|
|00005300| 22 20 69 6e 20 74 68 69 | 73 20 64 69 72 65 63 74 |" in thi|s direct|
|00005310| 6f 72 79 2e 20 20 4c 69 | 73 74 20 69 74 0a 62 79 |ory. Li|st it.by|
|00005320| 20 73 61 79 69 6e 67 20 | 22 63 61 74 20 66 6f 6f | saying |"cat foo|
|00005330| 64 22 3b 20 74 68 65 6e | 20 74 79 70 65 20 22 72 |d"; then| type "r|
|00005340| 65 61 64 79 22 2e 0a 23 | 63 72 65 61 74 65 20 66 |eady"..#|create f|
|00005350| 6f 6f 64 0a 20 20 74 68 | 69 73 20 69 73 20 74 68 |ood. th|is is th|
|00005360| 65 20 66 69 6c 65 0a 20 | 20 6e 61 6d 65 64 20 66 |e file. | named f|
|00005370| 6f 6f 64 2e 0a 23 63 6f | 70 79 6f 75 74 0a 23 75 |ood..#co|pyout.#u|
|00005380| 73 65 72 0a 23 75 6e 63 | 6f 70 79 6f 75 74 0a 74 |ser.#unc|opyout.t|
|00005390| 61 69 6c 20 2d 32 20 2e | 6f 63 6f 70 79 20 3e 58 |ail -2 .|ocopy >X|
|000053a0| 31 0a 23 63 6d 70 20 58 | 31 20 66 6f 6f 64 0a 23 |1.#cmp X|1 food.#|
|000053b0| 6c 6f 67 0a 23 6e 65 78 | 74 0a 33 2e 33 62 20 20 |log.#nex|t.3.3b |
|000053c0| 32 0a 4c 33 2e 33 62 00 | 00 00 00 00 00 00 00 00 |2.L3.3b.|........|
|000053d0| f0 10 76 f5 09 01 b4 81 | 00 00 23 02 23 70 72 69 |..v.....|..#.#pri|
|000053e0| 6e 74 0a 4f 66 20 63 6f | 75 72 73 65 2c 20 79 6f |nt.Of co|urse, yo|
|000053f0| 75 20 63 61 6e 20 70 72 | 69 6e 74 20 61 6e 79 20 |u can pr|int any |
|00005400| 66 69 6c 65 20 77 69 74 | 68 20 22 63 61 74 22 2e |file wit|h "cat".|
|00005410| 0a 49 6e 20 70 61 72 74 | 69 63 75 6c 61 72 2c 20 |.In part|icular, |
|00005420| 69 74 20 69 73 20 63 6f | 6d 6d 6f 6e 20 74 6f 20 |it is co|mmon to |
|00005430| 66 69 72 73 74 20 75 73 | 65 0a 22 6c 73 22 20 74 |first us|e."ls" t|
|00005440| 6f 20 66 69 6e 64 20 74 | 68 65 20 6e 61 6d 65 20 |o find t|he name |
|00005450| 6f 66 20 61 20 66 69 6c | 65 20 61 6e 64 20 74 68 |of a fil|e and th|
|00005460| 65 6e 20 22 63 61 74 22 | 0a 74 6f 20 70 72 69 6e |en "cat"|.to prin|
|00005470| 74 20 69 74 2e 20 20 4e | 6f 74 65 20 74 68 65 20 |t it. N|ote the |
|00005480| 64 69 66 66 65 72 65 6e | 63 65 20 62 65 74 77 65 |differen|ce betwe|
|00005490| 65 6e 0a 22 6c 73 22 2c | 20 77 68 69 63 68 20 74 |en."ls",| which t|
|000054a0| 65 6c 6c 73 20 79 6f 75 | 20 74 68 65 20 6e 61 6d |ells you| the nam|
|000054b0| 65 20 6f 66 20 74 68 65 | 20 66 69 6c 65 73 2c 0a |e of the| files,.|
|000054c0| 61 6e 64 20 22 63 61 74 | 22 2c 20 77 68 69 63 68 |and "cat|", which|
|000054d0| 20 74 65 6c 6c 73 20 79 | 6f 75 20 74 68 65 20 63 | tells y|ou the c|
|000054e0| 6f 6e 74 65 6e 74 73 2e | 0a 0a 4f 6e 65 20 66 69 |ontents.|..One fi|
|000054f0| 6c 65 20 69 6e 20 74 68 | 65 20 63 75 72 72 65 6e |le in th|e curren|
|00005500| 74 20 64 69 72 65 63 74 | 6f 72 79 20 69 73 20 6e |t direct|ory is n|
|00005510| 61 6d 65 64 20 66 6f 72 | 0a 61 20 50 72 65 73 69 |amed for|.a Presi|
|00005520| 64 65 6e 74 2e 20 20 50 | 72 69 6e 74 20 74 68 65 |dent. P|rint the|
|00005530| 20 66 69 6c 65 2c 20 74 | 68 65 6e 20 74 79 70 65 | file, t|hen type|
|00005540| 20 22 72 65 61 64 79 22 | 2e 0a 23 63 72 65 61 74 | "ready"|..#creat|
|00005550| 65 20 72 6f 6f 73 65 76 | 65 6c 74 0a 20 20 74 68 |e roosev|elt. th|
|00005560| 69 73 20 66 69 6c 65 20 | 69 73 20 6e 61 6d 65 64 |is file |is named|
|00005570| 20 72 6f 6f 73 65 76 65 | 6c 74 0a 20 20 61 6e 64 | rooseve|lt. and|
|00005580| 20 63 6f 6e 74 61 69 6e | 73 20 74 68 72 65 65 20 | contain|s three |
|00005590| 6c 69 6e 65 73 20 6f 66 | 0a 20 20 74 65 78 74 2e |lines of|. text.|
|000055a0| 0a 23 63 6f 70 79 6f 75 | 74 0a 23 75 73 65 72 0a |.#copyou|t.#user.|
|000055b0| 23 75 6e 63 6f 70 79 6f | 75 74 0a 63 70 20 2e 6f |#uncopyo|ut.cp .o|
|000055c0| 63 6f 70 79 20 58 32 0a | 74 61 69 6c 20 2d 33 20 |copy X2.|tail -3 |
|000055d0| 2e 6f 63 6f 70 79 20 3e | 58 31 0a 23 63 6d 70 20 |.ocopy >|X1.#cmp |
|000055e0| 58 31 20 72 6f 6f 73 65 | 76 65 6c 74 0a 23 6c 6f |X1 roose|velt.#lo|
|000055f0| 67 0a 23 6e 65 78 74 0a | 33 2e 32 62 20 32 0a 20 |g.#next.|3.2b 2. |
|00005600| 4c 34 2e 31 61 00 00 00 | 00 00 00 00 00 00 e9 10 |L4.1a...|........|
|00005610| 2d aa 09 01 b4 81 00 00 | 5f 01 23 70 72 69 6e 74 |-.......|_.#print|
|00005620| 0a 54 68 65 20 22 6c 73 | 22 20 63 6f 6d 6d 61 6e |.The "ls|" comman|
|00005630| 64 20 6d 61 79 20 62 65 | 20 67 69 76 65 6e 20 77 |d may be| given w|
|00005640| 69 74 68 20 6f 6e 65 0a | 6f 72 20 6d 6f 72 65 20 |ith one.|or more |
|00005650| 66 69 6c 65 20 6e 61 6d | 65 73 2e 20 20 49 6e 20 |file nam|es. In |
|00005660| 74 68 61 74 20 63 61 73 | 65 2c 0a 69 74 20 77 69 |that cas|e,.it wi|
|00005670| 6c 6c 20 74 65 6c 6c 20 | 77 68 69 63 68 20 77 68 |ll tell |which wh|
|00005680| 69 63 68 20 6f 66 20 74 | 68 65 20 66 69 6c 65 73 |ich of t|he files|
|00005690| 20 65 78 69 73 74 2e 0a | 48 6f 77 20 6d 61 6e 79 | exist..|How many|
|000056a0| 20 6f 66 20 74 68 65 20 | 66 69 6c 65 73 20 22 64 | of the |files "d|
|000056b0| 6f 75 67 22 2c 20 22 64 | 61 76 65 22 2c 20 61 6e |oug", "d|ave", an|
|000056c0| 64 0a 22 64 65 6e 6e 69 | 73 22 20 65 78 69 73 74 |d."denni|s" exist|
|000056d0| 20 69 6e 20 74 68 69 73 | 20 64 69 72 65 63 74 6f | in this| directo|
|000056e0| 72 79 3f 20 20 46 69 6e | 64 20 6f 75 74 0a 61 6e |ry? Fin|d out.an|
|000056f0| 64 20 74 68 65 6e 20 74 | 79 70 65 20 22 61 6e 73 |d then t|ype "ans|
|00005700| 77 65 72 20 4e 22 20 77 | 68 65 72 65 20 4e 20 69 |wer N" w|here N i|
|00005710| 73 20 74 68 65 20 6e 75 | 6d 62 65 72 0a 79 6f 75 |s the nu|mber.you|
|00005720| 20 66 6f 75 6e 64 2e 0a | 23 63 72 65 61 74 65 20 | found..|#create |
|00005730| 64 65 6e 6e 69 73 0a 23 | 63 72 65 61 74 65 20 64 |dennis.#|create d|
|00005740| 6f 75 67 0a 23 63 6f 70 | 79 69 6e 0a 23 75 73 65 |oug.#cop|yin.#use|
|00005750| 72 0a 23 75 6e 63 6f 70 | 79 69 6e 0a 23 6d 61 74 |r.#uncop|yin.#mat|
|00005760| 63 68 20 32 0a 23 6c 6f | 67 0a 23 6e 65 78 74 0a |ch 2.#lo|g.#next.|
|00005770| 35 2e 31 61 20 20 31 30 | 0a 20 4c 34 2e 32 61 00 |5.1a 10|. L4.2a.|
|00005780| 00 00 00 00 00 00 00 00 | e9 10 37 aa 09 01 b4 81 |........|..7.....|
|00005790| 00 00 ad 01 23 70 72 69 | 6e 74 0a 49 66 20 61 20 |....#pri|nt.If a |
|000057a0| 66 69 6c 65 20 6e 61 6d | 65 20 69 73 20 67 69 76 |file nam|e is giv|
|000057b0| 65 6e 20 77 69 74 68 20 | 74 68 65 20 22 6c 73 22 |en with |the "ls"|
|000057c0| 20 63 6f 6d 6d 61 6e 64 | 2c 0a 69 74 20 74 65 6c | command|,.it tel|
|000057d0| 6c 73 20 79 6f 75 20 77 | 68 65 74 68 65 72 20 74 |ls you w|hether t|
|000057e0| 68 61 74 20 66 69 6c 65 | 20 65 78 69 73 74 73 2e |hat file| exists.|
|000057f0| 0a 54 68 65 20 66 69 6c | 65 20 6e 61 6d 65 20 69 |.The fil|e name i|
|00005800| 73 20 6c 69 73 74 65 64 | 20 69 66 20 74 68 65 20 |s listed| if the |
|00005810| 66 69 6c 65 20 65 78 69 | 73 74 73 3b 0a 69 66 20 |file exi|sts;.if |
|00005820| 69 74 20 64 6f 65 73 6e | 27 74 2c 20 61 20 63 6f |it doesn|'t, a co|
|00005830| 6d 70 6c 61 69 6e 74 20 | 69 73 20 74 79 70 65 64 |mplaint |is typed|
|00005840| 2e 0a 46 6f 72 20 65 78 | 61 6d 70 6c 65 2c 0a 20 |..For ex|ample,. |
|00005850| 20 6c 73 20 67 65 6f 72 | 67 65 0a 77 69 6c 6c 20 | ls geor|ge.will |
|00005860| 74 79 70 65 20 22 67 65 | 6f 72 67 65 22 20 69 66 |type "ge|orge" if|
|00005870| 20 74 68 65 20 66 69 6c | 65 20 65 78 69 73 74 73 | the fil|e exists|
|00005880| 2c 0a 61 6e 64 20 22 67 | 65 6f 72 67 65 20 6e 6f |,.and "g|eorge no|
|00005890| 74 20 66 6f 75 6e 64 22 | 20 69 66 20 69 74 20 69 |t found"| if it i|
|000058a0| 73 20 6d 69 73 73 69 6e | 67 2e 0a 0a 49 73 20 74 |s missin|g...Is t|
|000058b0| 68 65 72 65 20 61 20 66 | 69 6c 65 20 6e 61 6d 65 |here a f|ile name|
|000058c0| 64 20 22 61 6c 65 78 61 | 6e 64 65 72 22 20 69 6e |d "alexa|nder" in|
|000058d0| 20 74 68 65 0a 63 75 72 | 72 65 6e 74 20 64 69 72 | the.cur|rent dir|
|000058e0| 65 63 74 6f 72 79 3f 20 | 20 46 69 6e 64 20 6f 75 |ectory? | Find ou|
|000058f0| 74 2c 20 74 68 65 6e 20 | 74 79 70 65 20 22 79 65 |t, then |type "ye|
|00005900| 73 22 20 6f 72 20 22 6e | 6f 22 2e 0a 23 63 6f 70 |s" or "n|o"..#cop|
|00005910| 79 69 6e 0a 23 75 73 65 | 72 0a 23 75 6e 63 6f 70 |yin.#use|r.#uncop|
|00005920| 79 69 6e 0a 23 6d 61 74 | 63 68 20 6e 6f 0a 23 6c |yin.#mat|ch no.#l|
|00005930| 6f 67 0a 23 6e 65 78 74 | 0a 34 2e 32 62 20 31 30 |og.#next|.4.2b 10|
|00005940| 0a 20 4c 34 2e 32 62 00 | 00 00 00 00 00 00 00 00 |. L4.2b.|........|
|00005950| eb 10 aa d9 09 01 b4 81 | 00 00 ed 01 23 70 72 69 |........|....#pri|
|00005960| 6e 74 0a 59 6f 75 20 63 | 61 6e 20 69 6e 71 75 69 |nt.You c|an inqui|
|00005970| 72 65 20 61 62 6f 75 74 | 20 73 65 76 65 72 61 6c |re about| several|
|00005980| 20 66 69 6c 65 73 20 61 | 74 20 6f 6e 63 65 0a 77 | files a|t once.w|
|00005990| 69 74 68 20 74 68 65 20 | 22 6c 73 22 20 63 6f 6d |ith the |"ls" com|
|000059a0| 6d 61 6e 64 2e 20 20 49 | 66 20 79 6f 75 20 74 79 |mand. I|f you ty|
|000059b0| 70 65 2c 20 66 6f 72 20 | 65 78 61 6d 70 6c 65 2c |pe, for |example,|
|000059c0| 0a 20 20 20 6c 73 20 66 | 65 65 20 66 69 20 66 6f |. ls f|ee fi fo|
|000059d0| 20 66 75 6d 0a 79 6f 75 | 20 77 69 6c 6c 20 62 65 | fum.you| will be|
|000059e0| 20 74 6f 6c 64 20 77 68 | 69 63 68 20 6f 66 20 74 | told wh|ich of t|
|000059f0| 68 65 20 66 6f 75 72 20 | 66 69 6c 65 73 20 22 66 |he four |files "f|
|00005a00| 65 65 22 2c 20 22 66 69 | 22 2c 20 22 66 6f 22 2c |ee", "fi|", "fo",|
|00005a10| 0a 61 6e 64 20 22 66 75 | 6d 22 20 65 78 69 73 74 |.and "fu|m" exist|
|00005a20| 2e 20 20 49 6e 20 74 68 | 65 20 63 75 72 72 65 6e |. In th|e curren|
|00005a30| 74 20 64 69 72 65 63 74 | 6f 72 79 20 6f 6e 6c 79 |t direct|ory only|
|00005a40| 20 6f 6e 65 0a 6f 66 20 | 74 68 65 20 66 69 6c 65 | one.of |the file|
|00005a50| 73 20 22 67 72 6f 76 65 | 72 22 2c 20 22 67 65 72 |s "grove|r", "ger|
|00005a60| 61 6c 64 22 2c 20 6f 72 | 20 22 67 65 6f 72 67 65 |ald", or| "george|
|00005a70| 22 20 65 78 69 73 74 73 | 2e 0a 46 69 6e 64 20 6f |" exists|..Find o|
|00005a80| 75 74 20 77 68 69 63 68 | 20 6f 6e 65 3b 20 74 68 |ut which| one; th|
|00005a90| 65 6e 20 72 65 6e 61 6d | 65 20 69 74 20 22 67 72 |en renam|e it "gr|
|00005aa0| 61 6e 74 22 2e 0a 54 79 | 70 65 20 22 72 65 61 64 |ant"..Ty|pe "read|
|00005ab0| 79 22 20 77 68 65 6e 20 | 79 6f 75 20 61 72 65 20 |y" when |you are |
|00005ac0| 64 6f 6e 65 2e 0a 23 63 | 72 65 61 74 65 20 67 65 |done..#c|reate ge|
|00005ad0| 72 61 6c 64 0a 66 69 6c | 65 0a 23 63 72 65 61 74 |rald.fil|e.#creat|
|00005ae0| 65 20 67 61 72 62 61 67 | 65 0a 67 61 72 62 61 67 |e garbag|e.garbag|
|00005af0| 65 20 69 74 20 69 73 2e | 0a 23 75 73 65 72 0a 23 |e it is.|.#user.#|
|00005b00| 63 72 65 61 74 65 20 58 | 31 0a 66 69 6c 65 0a 23 |create X|1.file.#|
|00005b10| 0a 63 6d 70 20 2d 73 20 | 58 31 20 67 72 61 6e 74 |.cmp -s |X1 grant|
|00005b20| 20 26 26 20 74 65 73 74 | 20 21 20 2d 72 20 67 65 | && test| ! -r ge|
|00005b30| 72 61 6c 64 0a 23 6c 6f | 67 0a 23 6e 65 78 74 0a |rald.#lo|g.#next.|
|00005b40| 35 2e 31 61 20 20 31 30 | 0a 61 4c 34 2e 33 61 00 |5.1a 10|.aL4.3a.|
|00005b50| 00 00 00 00 00 00 00 00 | e9 10 78 aa 09 01 b4 81 |........|..x.....|
|00005b60| 00 00 48 02 23 70 72 69 | 6e 74 0a 59 6f 75 20 63 |..H.#pri|nt.You c|
|00005b70| 61 6e 20 75 73 65 20 74 | 68 65 20 22 6c 73 22 20 |an use t|he "ls" |
|00005b80| 63 6f 6d 6d 61 6e 64 20 | 74 6f 20 61 73 6b 20 77 |command |to ask w|
|00005b90| 68 65 74 68 65 72 0a 61 | 20 73 69 6e 67 6c 65 20 |hether.a| single |
|00005ba0| 66 69 6c 65 20 65 78 69 | 73 74 73 20 77 69 74 68 |file exi|sts with|
|00005bb0| 6f 75 74 20 6c 69 73 74 | 69 6e 67 20 74 68 65 20 |out list|ing the |
|00005bc0| 65 6e 74 69 72 65 0a 64 | 69 72 65 63 74 6f 72 79 |entire.d|irectory|
|00005bd0| 2e 20 20 46 6f 72 20 65 | 78 61 6d 70 6c 65 2c 20 |. For e|xample, |
|00005be0| 22 6c 73 20 67 65 6f 72 | 67 65 22 20 77 69 6c 6c |"ls geor|ge" will|
|00005bf0| 20 6c 69 73 74 0a 22 67 | 65 6f 72 67 65 22 20 69 | list."g|eorge" i|
|00005c00| 66 20 74 68 65 72 65 20 | 69 73 20 61 20 66 69 6c |f there |is a fil|
|00005c10| 65 20 77 69 74 68 20 74 | 68 61 74 20 6e 61 6d 65 |e with t|hat name|
|00005c20| 2c 20 61 6e 64 0a 63 6f | 6d 70 6c 61 69 6e 20 69 |, and.co|mplain i|
|00005c30| 66 20 74 68 65 72 65 20 | 69 73 20 6e 6f 74 20 6f |f there |is not o|
|00005c40| 6e 65 2e 20 20 54 68 69 | 73 20 64 69 72 65 63 74 |ne. Thi|s direct|
|00005c50| 6f 72 79 0a 63 6f 6e 74 | 61 69 6e 73 20 61 20 66 |ory.cont|ains a f|
|00005c60| 69 6c 65 20 6e 61 6d 65 | 64 20 22 61 72 74 68 75 |ile name|d "arthu|
|00005c70| 72 22 20 62 75 74 20 6e | 6f 20 66 69 6c 65 20 6e |r" but n|o file n|
|00005c80| 61 6d 65 64 0a 22 61 6c | 61 6e 22 2e 20 20 59 6f |amed."al|an". Yo|
|00005c90| 75 20 63 61 6e 20 76 65 | 72 69 66 79 20 74 68 61 |u can ve|rify tha|
|00005ca0| 74 20 62 79 20 74 79 70 | 69 6e 67 20 74 68 65 0a |t by typ|ing the.|
|00005cb0| 6f 72 64 69 6e 61 72 79 | 20 22 6c 73 22 20 63 6f |ordinary| "ls" co|
|00005cc0| 6d 6d 61 6e 64 2e 20 20 | 54 68 65 6e 20 74 72 79 |mmand. |Then try|
|00005cd0| 20 74 79 70 69 6e 67 20 | 22 6c 73 20 61 72 74 68 | typing |"ls arth|
|00005ce0| 75 72 22 0a 74 6f 20 73 | 65 65 20 77 68 61 74 20 |ur".to s|ee what |
|00005cf0| 68 61 70 70 65 6e 73 2c | 20 61 6e 64 20 66 6f 6c |happens,| and fol|
|00005d00| 6c 6f 77 20 74 68 61 74 | 20 62 79 20 22 6c 73 20 |low that| by "ls |
|00005d10| 61 6c 61 6e 22 2e 0a 54 | 68 65 6e 20 74 79 70 65 |alan"..T|hen type|
|00005d20| 20 22 72 65 61 64 79 22 | 2e 0a 23 63 72 65 61 74 | "ready"|..#creat|
|00005d30| 65 20 61 72 74 68 75 72 | 0a 78 78 78 0a 23 63 6f |e arthur|.xxx.#co|
|00005d40| 70 79 69 6e 0a 23 75 73 | 65 72 0a 23 75 6e 63 6f |pyin.#us|er.#unco|
|00005d50| 70 79 69 6e 0a 67 72 65 | 70 20 27 6c 73 20 61 72 |pyin.gre|p 'ls ar|
|00005d60| 74 68 75 72 27 20 2e 63 | 6f 70 79 20 3e 2f 64 65 |thur' .c|opy >/de|
|00005d70| 76 2f 6e 75 6c 6c 20 26 | 26 20 67 72 65 70 20 27 |v/null &|& grep '|
|00005d80| 6c 73 20 61 6c 61 6e 27 | 20 2e 63 6f 70 79 20 3e |ls alan'| .copy >|
|00005d90| 2f 64 65 76 2f 6e 75 6c | 6c 0a 23 6c 6f 67 0a 23 |/dev/nul|l.#log.#|
|00005da0| 6e 65 78 74 0a 34 2e 33 | 62 20 30 0a 4c 34 2e 33 |next.4.3|b 0.L4.3|
|00005db0| 62 00 00 00 00 00 00 00 | 00 00 f0 10 e6 f5 09 01 |b.......|........|
|00005dc0| b4 81 00 00 67 01 23 70 | 72 69 6e 74 0a 57 69 74 |....g.#p|rint.Wit|
|00005dd0| 68 20 74 68 65 20 22 6c | 73 22 20 63 6f 6d 6d 61 |h the "l|s" comma|
|00005de0| 6e 64 2c 20 79 6f 75 20 | 63 61 6e 20 69 6e 71 75 |nd, you |can inqu|
|00005df0| 69 72 65 20 61 62 6f 75 | 74 20 73 65 76 65 72 61 |ire abou|t severa|
|00005e00| 6c 0a 73 70 65 63 69 66 | 69 63 20 66 69 6c 65 73 |l.specif|ic files|
|00005e10| 20 61 74 20 6f 6e 63 65 | 2e 20 20 46 6f 72 20 65 | at once|. For e|
|00005e20| 78 61 6d 70 6c 65 2c 20 | 69 6e 20 74 68 65 20 70 |xample, |in the p|
|00005e30| 72 65 76 69 6f 75 73 0a | 63 61 73 65 2c 20 79 6f |revious.|case, yo|
|00005e40| 75 20 63 6f 75 6c 64 20 | 74 79 70 65 0a 0a 6c 73 |u could |type..ls|
|00005e50| 20 61 72 74 68 75 72 20 | 61 6c 61 6e 0a 0a 61 6e | arthur |alan..an|
|00005e60| 64 20 62 65 20 74 6f 6c | 64 20 61 62 6f 75 74 20 |d be tol|d about |
|00005e70| 62 6f 74 68 20 66 69 6c | 65 73 2e 0a 0a 57 68 69 |both fil|es...Whi|
|00005e80| 63 68 20 6f 6e 65 20 6f | 66 20 74 68 65 20 66 69 |ch one o|f the fi|
|00005e90| 6c 65 73 20 22 62 72 75 | 63 65 22 20 61 6e 64 20 |les "bru|ce" and |
|00005ea0| 22 62 65 6e 22 20 65 78 | 69 73 74 73 3f 0a 54 79 |"ben" ex|ists?.Ty|
|00005eb0| 70 65 20 22 61 6e 73 77 | 65 72 20 4e 41 4d 45 22 |pe "answ|er NAME"|
|00005ec0| 2c 20 77 68 65 72 65 20 | 4e 41 4d 45 20 69 73 20 |, where |NAME is |
|00005ed0| 74 68 65 20 6f 6e 65 20 | 79 6f 75 20 66 69 6e 64 |the one |you find|
|00005ee0| 2e 0a 23 63 72 65 61 74 | 65 20 62 72 75 63 65 0a |..#creat|e bruce.|
|00005ef0| 62 72 75 63 65 0a 23 63 | 6f 70 79 69 6e 0a 23 75 |bruce.#c|opyin.#u|
|00005f00| 73 65 72 0a 23 75 6e 63 | 6f 70 79 69 6e 0a 23 6d |ser.#unc|opyin.#m|
|00005f10| 61 74 63 68 20 62 72 75 | 63 65 0a 23 6c 6f 67 0a |atch bru|ce.#log.|
|00005f20| 23 6e 65 78 74 0a 34 2e | 33 63 20 32 0a 6e 4c 34 |#next.4.|3c 2.nL4|
|00005f30| 2e 33 63 00 00 00 00 00 | 00 00 00 00 e9 10 ff aa |.3c.....|........|
|00005f40| 09 01 b4 81 00 00 81 01 | 23 70 72 69 6e 74 0a 59 |........|#print.Y|
|00005f50| 6f 75 72 20 64 69 72 65 | 63 74 6f 72 79 20 63 6f |our dire|ctory co|
|00005f60| 6e 74 61 69 6e 73 20 6f | 6e 6c 79 20 6f 6e 65 20 |ntains o|nly one |
|00005f70| 6f 66 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |of the f|ollowing|
|00005f80| 0a 66 69 6c 65 73 3a 20 | 22 72 69 63 68 61 72 64 |.files: |"richard|
|00005f90| 22 2c 20 22 72 6f 62 65 | 72 74 22 2c 20 22 72 61 |", "robe|rt", "ra|
|00005fa0| 6c 70 68 22 2c 20 22 72 | 6f 67 65 72 22 2e 20 20 |lph", "r|oger". |
|00005fb0| 46 69 6e 64 20 6f 75 74 | 0a 77 68 69 63 68 20 6f |Find out|.which o|
|00005fc0| 6e 65 20 65 78 69 73 74 | 73 2c 20 61 6e 64 20 70 |ne exist|s, and p|
|00005fd0| 72 69 6e 74 20 74 68 65 | 20 63 6f 6e 74 65 6e 74 |rint the| content|
|00005fe0| 73 20 6f 66 20 74 68 61 | 74 20 66 69 6c 65 0a 6f |s of tha|t file.o|
|00005ff0| 6e 20 79 6f 75 72 20 74 | 65 72 6d 69 6e 61 6c 20 |n your t|erminal |
|00006000| 28 72 65 6d 65 6d 62 65 | 72 20 74 68 65 20 22 63 |(remembe|r the "c|
|00006010| 61 74 22 20 63 6f 6d 6d | 61 6e 64 3f 29 2e 0a 54 |at" comm|and?)..T|
|00006020| 68 65 6e 20 74 79 70 65 | 20 22 72 65 61 64 79 22 |hen type| "ready"|
|00006030| 2e 0a 23 63 72 65 61 74 | 65 20 72 6f 62 65 72 74 |..#creat|e robert|
|00006040| 0a 74 68 69 73 20 69 73 | 20 74 68 65 20 63 6f 6e |.this is| the con|
|00006050| 74 65 6e 74 73 20 6f 66 | 20 66 69 6c 65 0a 72 6f |tents of| file.ro|
|00006060| 62 65 72 74 20 77 68 69 | 63 68 20 79 6f 75 20 68 |bert whi|ch you h|
|00006070| 61 64 20 74 6f 20 70 72 | 69 6e 74 2e 0a 23 63 6f |ad to pr|int..#co|
|00006080| 70 79 69 6e 0a 23 75 73 | 65 72 0a 23 75 6e 63 6f |pyin.#us|er.#unco|
|00006090| 70 79 69 6e 0a 67 72 65 | 70 20 27 63 61 74 20 72 |pyin.gre|p 'cat r|
|000060a0| 6f 62 27 20 2e 63 6f 70 | 79 20 3e 2f 64 65 76 2f |ob' .cop|y >/dev/|
|000060b0| 6e 75 6c 6c 0a 23 6c 6f | 67 0a 23 6e 65 78 74 0a |null.#lo|g.#next.|
|000060c0| 35 2e 31 61 20 20 31 30 | 0a 6f 4c 35 2e 31 61 00 |5.1a 10|.oL5.1a.|
|000060d0| 00 00 00 00 00 00 00 00 | e9 10 0a b2 09 01 b4 81 |........|........|
|000060e0| 00 00 96 03 23 70 72 69 | 6e 74 0a 4d 6f 73 74 20 |....#pri|nt.Most |
|000060f0| 55 4e 49 58 20 63 6f 6d | 6d 61 6e 64 73 2c 20 6c |UNIX com|mands, l|
|00006100| 69 6b 65 20 22 6c 73 22 | 20 61 6e 64 20 22 63 61 |ike "ls"| and "ca|
|00006110| 74 22 2c 20 6c 65 74 20 | 79 6f 75 0a 73 70 65 63 |t", let |you.spec|
|00006120| 69 66 79 20 61 6e 79 20 | 6e 75 6d 62 65 72 20 6f |ify any |number o|
|00006130| 66 20 66 69 6c 65 20 6e | 61 6d 65 73 20 61 66 74 |f file n|ames aft|
|00006140| 65 72 20 74 68 65 20 63 | 6f 6d 6d 61 6e 64 2e 0a |er the c|ommand..|
|00006150| 54 6f 20 6d 61 6b 65 20 | 74 68 69 73 20 61 73 20 |To make |this as |
|00006160| 65 61 73 79 20 61 73 20 | 70 6f 73 73 69 62 6c 65 |easy as |possible|
|00006170| 2c 20 74 68 65 72 65 20 | 61 72 65 20 73 6f 6d 65 |, there |are some|
|00006180| 0a 77 61 79 73 20 74 6f | 20 61 62 62 72 65 76 69 |.ways to| abbrevi|
|00006190| 61 74 65 20 66 69 6c 65 | 20 6e 61 6d 65 73 2e 20 |ate file| names. |
|000061a0| 20 54 68 69 73 20 69 73 | 20 75 73 75 61 6c 6c 79 | This is| usually|
|000061b0| 0a 66 61 73 74 65 72 20 | 61 6e 64 20 6d 6f 72 65 |.faster |and more|
|000061c0| 20 61 63 63 75 72 61 74 | 65 20 74 68 61 6e 20 74 | accurat|e than t|
|000061d0| 79 70 69 6e 67 20 6f 75 | 74 20 74 68 65 20 6c 69 |yping ou|t the li|
|000061e0| 73 74 20 69 6e 20 66 75 | 6c 6c 2e 0a 0a 46 6f 72 |st in fu|ll...For|
|000061f0| 20 65 78 61 6d 70 6c 65 | 2c 20 77 68 65 6e 20 74 | example|, when t|
|00006200| 68 65 20 63 68 61 72 61 | 63 74 65 72 20 22 3f 22 |he chara|cter "?"|
|00006210| 20 69 73 20 75 73 65 64 | 20 69 6e 20 61 20 66 69 | is used| in a fi|
|00006220| 6c 65 20 6e 61 6d 65 2c | 0a 69 74 20 77 69 6c 6c |le name,|.it will|
|00006230| 20 72 65 70 72 65 73 65 | 6e 74 20 61 6e 79 20 63 | represe|nt any c|
|00006240| 68 61 72 61 63 74 65 72 | 20 74 68 61 74 20 6d 69 |haracter| that mi|
|00006250| 67 68 74 20 62 65 0a 69 | 6e 20 61 20 66 69 6c 65 |ght be.i|n a file|
|00006260| 20 6e 61 6d 65 2e 20 20 | 54 68 61 74 20 69 73 2c | name. |That is,|
|00006270| 20 74 68 65 20 6e 61 6d | 65 20 22 61 3f 22 20 69 | the nam|e "a?" i|
|00006280| 73 0a 61 6e 20 61 62 62 | 72 65 76 69 61 74 69 6f |s.an abb|reviatio|
|00006290| 6e 20 66 6f 72 20 74 68 | 65 20 66 69 6c 65 73 20 |n for th|e files |
|000062a0| 22 61 31 22 2c 20 22 61 | 32 22 2c 20 22 61 61 22 |"a1", "a|2", "aa"|
|000062b0| 2c 0a 61 6e 64 20 73 6f | 20 66 6f 72 74 68 2e 20 |,.and so| forth. |
|000062c0| 20 59 6f 75 20 63 61 6e | 20 73 61 79 0a 20 20 6c | You can| say. l|
|000062d0| 73 20 61 3f 0a 61 6e 64 | 20 69 66 20 74 68 65 72 |s a?.and| if ther|
|000062e0| 65 20 61 72 65 20 61 6e | 79 20 66 69 6c 65 20 6e |e are an|y file n|
|000062f0| 61 6d 65 73 20 62 65 67 | 69 6e 6e 69 6e 67 20 77 |ames beg|inning w|
|00006300| 69 74 68 0a 22 61 22 20 | 74 68 61 74 20 61 72 65 |ith."a" |that are|
|00006310| 20 65 78 61 63 74 6c 79 | 20 74 77 6f 20 6c 65 74 | exactly| two let|
|00006320| 74 65 72 73 20 6c 6f 6e | 67 2c 20 74 68 65 20 63 |ters lon|g, the c|
|00006330| 6f 6d 70 75 74 65 72 0a | 77 69 6c 6c 20 74 65 6c |omputer.|will tel|
|00006340| 6c 20 79 6f 75 20 74 68 | 65 69 72 20 6e 61 6d 65 |l you th|eir name|
|00006350| 73 2e 20 20 54 72 79 20 | 74 68 61 74 20 68 65 72 |s. Try |that her|
|00006360| 65 2e 0a 46 69 72 73 74 | 20 6c 69 73 74 20 61 6c |e..First| list al|
|00006370| 6c 20 74 68 65 20 66 69 | 6c 65 20 6e 61 6d 65 73 |l the fi|le names|
|00006380| 20 77 69 74 68 20 22 6c | 73 22 3b 20 74 68 65 6e | with "l|s"; then|
|00006390| 20 74 79 70 65 0a 20 20 | 6c 73 20 61 3f 0a 74 6f | type. |ls a?.to|
|000063a0| 20 67 65 74 20 61 6c 6c | 20 74 68 65 20 74 77 6f | get all| the two|
|000063b0| 20 6c 65 74 74 65 72 20 | 6e 61 6d 65 73 20 62 65 | letter |names be|
|000063c0| 67 69 6e 6e 69 6e 67 20 | 77 69 74 68 20 22 61 22 |ginning |with "a"|
|000063d0| 2e 0a 54 68 65 6e 20 74 | 79 70 65 20 22 72 65 61 |..Then t|ype "rea|
|000063e0| 64 79 22 2e 0a 23 63 72 | 65 61 74 65 20 61 31 0a |dy"..#cr|eate a1.|
|000063f0| 23 63 72 65 61 74 65 20 | 61 31 32 0a 23 63 72 65 |#create |a12.#cre|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.