0% found this document useful (0 votes)
4 views69 pages

Linux Notes

The document provides an overview of various types of operating systems, focusing on Linux, including its history, features, and utilities. It discusses process management, memory management, input/output operations, and file management within operating systems. Additionally, it highlights the differences between single-user and multi-user systems, as well as the various shells available in Linux.

Uploaded by

wolfm699487
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
4 views69 pages

Linux Notes

The document provides an overview of various types of operating systems, focusing on Linux, including its history, features, and utilities. It discusses process management, memory management, input/output operations, and file management within operating systems. Additionally, it highlights the differences between single-user and multi-user systems, as well as the various shells available in Linux.

Uploaded by

wolfm699487
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
Opening Systems Fc Opi Sen | ‘Types of Systems ‘i Org yen They ig {in Arte | i Cong w OK Fess itn i |S stein I Deg in See: Seo fs: ave | teeta pont | Eng Li Se Lopet Of som | iemaacn tsa SCSI sn IDE Disk Paton Mout sins Crating Bou Disk * Insisin Meta Ini Cases NOD OHOOONOOO OOOH OOOO Phd bead wad wad bee a tat eal ea a et sl Jd (je (e (—/e 4 Comets Using 10 hecklers 2 / esa Ra Hat Liu fam CD-ROM » ‘using Lins Tex Mode 9 “Pi Booting Re Ha Linus) ss 1 Uoislig Re at Linx @ Senmay a | eaeeeesersazzanesae ‘The Liaw Fle System Fle Ning Comeins Reve Path Names ‘Types sin Line Types of ein Linx Commande in Linus esiyig te Caret Dito Pah (Changing te Cure Dicory Crating Dieciny Renoig a Diesry inte Cann fs Dewey Commands in Linus Dips the Cone of les ‘The anda tail commande imine ies Rervingies Moving nd Reais Dislayig te Comens Pgeise | fx Ewes aston of Tes tor ir Ave with i lier exiag Sed with tev Etor Commands Usdin the sine x ‘The emacs Baar Gein Sar wie acs Ei ie “Te joe Bie ese 0 sss 0 ee Pe para | Fes en saan Pele InputRediecion Toe grep Fier | The we Fite | Toe cut Fier Toe ce Fler Arcs The tee Comma Samar 101 o cone oe Comers Ft hes Peis AD) t Steg oe 8 Ay Dregne nev Pelton 0 ae » ig i es Peis i Za : camp Z Ai in i oe =e heels oad per BO) Hatin tee " Tieecio Cm = CA nin i eines sescit Fe Cpe cm ‘6 Comments = ig tor Cine joo B/S Carat mn z | etn ui on Ha ean inn Ve » | am a (> Yo Uneig = ; a «feted i St es of 1 ei a ————s Icey amd | = 1s darn Ba (Checking 4 Backgrouid Press 6 Mince jag The op Caml ry ae net ening «Background Process = sae: a ing th Tine Taken Complete & Command 1 Scheie Ts ry nn The crea Uy oi he tet and () Comm Z ec ee * Saeee Be) tee 3 A = ae - ao ae wil eaenoaenesnnsnnnneeannnn emrtat ___Chapter_1 Introduction to Linux Operating System Introduction GR rus pou): | Snot wa Gs CP cp come pering Sy Li Process Management A process defi! a pogram in exceton. To, a program acs be inthe aia ‘memory elle endo aces emer (RAND. Wc ou ru potas te oeraing ‘ster ashe pot in te memory andthe CPU execs oe inst ine Ing maipmroming vine, any process un nthe compra he ne tine ‘peal eel process torn sinuleousy be operating sytem vies he CPU tine. The opr ys aloes times othe diferent proces ne many, hich files process exenton Memory Management Te opetig en lca ale men pose Howes st Frasca peenes os gen sm ean ney nd The ‘Siem ess tt ceding nl ed i ese fern at we mtb xed Teal ded emp ers Pees ene en why ain fe an em Thee: Cerin ema es Bear ko oy. Input/Output (1/0) Operations and Peripheral Management ‘When you execu an aplii, itacepe apt ap panes up Applic anak efor dese UO operations circ Therefore, opting steele the 10 eis, sch asthe eb the ous, he io pero ese VO operons Anering system alin controls tbe devo tice ote compe. These devices re ‘now a pepe. Tee OS manuges communication bcwen the devi and he CPU) Fic examp, an opening syscm mans communion ever th kre te rode an he CP. File Management oaths imparts etre of an opersing system i File manage The ope se cates ou peru pees, ch ei, nig, eg alg 83) ining aie (Types of Systems Singl-tner Systems | singe er sem can ony be wd by one pen tain, An cape of ingle wer 7 nesta Lin pang Sytem syste is person! contr (PC), The PCs posing er ys. sl, cera parse computer th a un rogram pr wie ay oe. Poe Liege en oe tthe ow cost of the antares nd wie range rile ote, the FC has sre very popula, Single-User Operating Systems [MS DOS (ik oping syste isan example o sip wer operating system. MS DOS asa communi ice (CU, Sse gph ti (G) Spy tw sd apn GU NO Soot crs ter un CU ota at nr ety © ae: commana (CU) plas tach yr a en (Multiuser systems (On mune tem, mor hi oe wer can wrk imitans Maser syste cn ‘fm mle press conureny a sae harvae remus, sch spss its) “Thee opm stench she ye cos oes toconme th ersten Rene wer can te coin ins 02 {eon an ome oa tier pte, Maty wes an sh pre comece a ater yen.) ase Concepts of Maliner System “The CPU ofa mater sen mae pow han hat of single wer sen, en ‘oppor lipgrnig ud mang, fo fens een for male Sse ‘Toesphin econo of minting et kes exe. You ahve aap of ‘le edng a ok, a ling Wo end overt ae. Youre actly erfomiog forth ne seen. Hower, a iver tine yout sp calle, ead be ten ospest oer the phos. Yo dr our tinea sale us ad nea nto fine poe oly eo of he ake Silay, the CPU vest ie betwen lh ete vat. Amine sem ns of smpter wth ver teri tach Tis rls ‘co eo woo thi conptr The ial canbe f Wop smart donb. Ahem consits of moni ss esos tas no had disk CPU. nae ‘add emi temalser sym pocser all the eirenens The an inal ly acs ran inert eee er abd liser se E. nnn Unt Opa Son ‘st wn is son CPU and eigen nd an waked he ‘ule sem A sar teria en work nay Opting sam a edo ois ed A sar minal ca ako cnn oe hen ee For emp assume hat ou ae woking a cpa cing Wado NT, Ais in, You te wig ese such he at meta tdpen he eal ‘omer Wien ou connec an work on air comeing LnstUND, you st, ‘Sigal te rsoutes of be LiUNX cmp ‘he and us as he apc sore aca fn eee my stare a mle sytem ‘Multiuser Operating Systems ‘Una, UND, a Widows NT tei seer exp of mie opting syste sch tens ore hoe urn cine oth sens ork ‘carey ay genie) OSSSre eo. “The Linux Operating System he History of Ux 0, Thm ei pl al pet pp eng Cake rae ee mento na Top cn a BU peng pon nc i inoue eee eae pp aia | iy neh Sn a eta pe not Ch ot ace tom af field tee repr Peete peel ay Sime edn ws napintas ere = Lost etn etn ee {NU Nt Than ifsc des aeagsee eee - a AFAAVRIAS Ly LAN 9-H4 a Un UU aa UU pcg Sym umber oot cose el aad fies, er By 199, te FSF (coped abe i bur wa tl ot cee. In 1991, Li Toes eed er anil it Lis. 1992 he in eel as caine wi he ince GNU sem for a compel fie pring stn TH ‘ering ye ald GNU eae contin of GNU ol Lis, Te {iin pring sm enon eee on iL pening sen", ‘Thee eel dts Ln Al edb he Line es. Some of te dint of iw ‘1 Dea Lins acai | Inetucion Ls Opa Seem Pers Le ina peti B {na follows ope develop el Te source al fhe Linas era! irae foray sl odin: on fe ln The, caret Serle veion aus alas open ets Uses cana igt nadine oe kr ete ‘When ae ess of Liu ela, ers an wrk pew versnoft s.f ‘ay To mits Lins Tea nes ict ait onl ad te rel ie ‘ew coef the Keel Tiss conta sed nln wich oct te ‘eve prculr oftware venion nd was elie cn wrk sete ad reper bugs. Tepe team he es he bs andes ae vein Te 2 je eon fr Be scene of Lin. ‘int fil ert = Li pega — ced To Lins sofware, sich set ees hows, prorat ‘Rew Gp fin OF Kernel These of te Lins sem thal wich io he opening ten ropa The eel con te rao of cpu, lrg hem dire wes ws. interacts dc wit be hee, king props oy to ie and perl aes “feet anwar pfs: However, te rds nt tect et) ha kre Tse, de gon pessimist, nace progam el esl forex pean Syton:Lue o ka Shell Lune ingle interface ll te sl. The hl provides ev fr ‘ter cei the copter ing he sel. The stern tk tot be incest eas of he hardvre. Scne of econ sels nik aba, on, cahyand fob, Yawn tot hse selina erie ee Linux Ubties and Application Programs Line itso cammands ae collation of porate presi regen, Tee progam can aed ug sh non he wit ‘tare rt ofthe ie opening syste, any Linas plo ropa, ach ‘sr dttue nage sons and word peceson, rane em dee ‘trae ved a Linux Compared to UNIX Line nas develope ting UND aa efeeace mde. Theo, te bai ache se enes of Lu and UNIX ae sae efit Link sacs soe ‘erin of UNE. Te min iene bees Lina so UNDK sth Liu i eof ent However assur of Liu can age a cfr inst. aditon, Lou ‘hes nt imote ar ening Line hs deep ls suchas Ce, FORTRAN, acl and scxpinglnpages, sh as ab, Per anthony of ee ‘sexiping gages ae fe cs I in, We Sere, sch as Apa ad ‘omer, chat Nea, provi thir ess hat acne wi Liu, eof (12: Cpr einen OE ee ng “Features and Utilities in Linux ‘Sone ofthe fees ofthe Linx operating stem ae cused ee Inceen 9 x Opa Multiprogramming Lind lows veer progr ob nea sian by diet er. This ete ‘caleba Time-Sharing Mutigramnia posible cathe note doth ine sit. fa ‘esha he pring se as o mage vats opr lanes ‘ropa fe uel ad CPU ine ite eng rg Fach pos ees CPU ine for pif pv and hen ele te Gu.) Multitasking [Ameria Linas rote downto wks, ch wang Smo wig oh dike ‘an rina fo ase The abit sy OS ohana th exe of ks ‘laowaamlinding Whos uk wing fre compton of ans she (CPU, neato wating in, ss exceing next ak There whe one skis ‘aig or pa rm he er snare be aig fo hr ke. The en iS rpem for cling as Virtual Memory (Peanut of scl memory mip tanya esc cee pe spo ‘emblem nls eves ven tine ash sto, partion tha agli iin seating steps th prog nd it, ih ace tg nhs pon feb i a asthe the toy, whenever ue eee, pean ‘pt rcs of oper otal Samba (Pe mame Sama i derived fm Be Serer Menge Block ral SMB, SMB he roel wed by Mis operating seas she lesan ies. Sent sas of par ht lene eS pt Ln) ing Sab 308 cast Lin lcm wah Winer 95 Was oc Widens Youn a ‘ir Window 95 Was 9 Wanns NF Seen ib Lins Saat een {Se MB ste pier ote Wino 95, Wado 98 Winds NT ‘src ih i poring (GMa Saas cecae (Cron Scheduler Lins hi ehtler program called Cron. Cs wed an commands, ip, | ogra cle ies > Ucensing Lins ena dr be GNU Genera Pali ens The ig Re Ht Lins ss ata pce cat make ny numer of eps of strand ste it ey. fare ie fori You ea lo dowsa Lut fe st fhe eel Web Server "ANe sere roses tht ris 0 he operaing sys an ember acest ‘tc t have ten publ ate frm of We pages A Wed srr an ele ‘he ase rms 0 wide es eter (WAN) be Inermee A WU seer ‘comment fered w aa cpu at vers We page > imu pri pte came Wi he Ape Wd serve Foc example, when ou ee ‘te as ofa Webs, weap ga Web rm, Apc Web ener sends te hn ap fe We st your ena "© sets Available in Linux ' ' nis hel ras ke ay ther ogra The epson ofthe var shale ale fer UNDULinu sees, Bourne Shell (Ge Hue sel was developed t ATA a ned fers developer Sephen Bou. The Horse sels sine wih al UNDX sens ad isso inthe in ‘inc, The excuse le ue fr Bouvet Wi on mot wd wed stl fe UNIX ems, = tno Ln pasting Sten © cShelt The shel nas evelped by Wil oy athe ives of Calf Ril vie aporanming interes oh C poparening nunge The sel drives sane fom is poganming nga, hich rer th C paring nung n sym. The eee fae fre Ctl Korn Shell ‘The Kom shel was developed at ATT eared aris devsloe Dvid Ker, The Kom sel coins hese 0 be Bou an sls, Te eee filename forthe Kom els Restricted Shell ‘eae thereto rove ined neces on operating sem oa we. The retical typi ae or guste who ely ned iid igh al es nal, yu cat we the esc rei he a he eigen oe Teneo Bash Shell ‘Teh shel san eauacenen onthe Bore sel ence ae is, ich san ‘secon for Bourse Agi Shel Bas a oda of Fe Salar Fonitons GNU Pvc Te as sel the eal self st Ln ye a i te the >in Seer. The Ba sl sore al of commands tht yo season In aon, the Bai shale sae te omen ht ou dn prvi aR at Una te ch command isa symolic ink Tesh Shell ‘Tet sid oT’ C sla san enhances of Cl. The Ts sli ao ‘nonsense mma ia soil tothe Teh hel. Yor ‘eect Tt sl by ping ether cote te a Re oem re ‘A Shell ‘he Ase ms developed by Kean Alm of te Unive el. Kemaas ‘he Bourne sl. Te A sll is sabe fr capa dt ave ltd me. The ‘ez le name fre Al sh pert Syston Le as Z Shel Th Zl oes fees of Teh and Kon shel nao, ponies lage ter ofits an exenive Scere The xc le ame fre Z hls a) Beginning a Linux Session: Logging On Ys the tone programe come oa omer ring he Lin operating em froma ompucs runing Windows 9SBRINT oeaig ste. Yxcin kn ie ‘ince mwa by ping he flowing command at them prone fen tosmame oe Pies Foretamps ify were woking ona computing te Windows 9 peaing st toe COMP ues sige oe Linc err were 182.1601. You nul sed ‘ete follwing commando connect he Li see ‘Afr yu comes othe Lins ere, amesaesnilaro bean shown low wuk! pete he se: sos ter oe ORS REST eae os needy ax Operating Systm afro abut wes has se umes ad paso is oe in he shaw a pas ies inte deta. When wer eerste oot peso ‘Se te and psn cack in sha ad pad ies. {te Loan informatio roid by te er ds nt mathe natn ath sha pas ie, 8 err mesa “Lagin cert” i dpe. This ck ‘ae tot auborie ws se sem, Whe ald er name seme, el rms dle on es. The el romp sent [Altes pomp ses ane ithe logon sae he wad current directory pane isthe caren wring dey oe wr. ‘Wien ae fogon su scat be distr ses ame deta othe we ‘Teliame decry isthe eta decry fester we the we legs I iy, gon rune sly hss ewe, a ei ome ctw, wt neces he ame rae, Frise, i ou se ae io an ob son name aso on ten airing oyu wills alvin on be © Ne eaten ene Fmt nr ‘The ee logon press pe jus a toe shown to: © See ach se san fan cl the er mee Be logon man, wih he ser es tomer wer he in: pro ape on he sre. ‘The septa log onto Liu eer are Avie Joan: pomp, emer ourlope ume an psn aro (user enters pram bere] ‘Security for Users: Passwords In Ln, te gon ces nae at ny etre wer ca aces he ope ‘ung Lins. As an dina mae fea, Lin alms yous yard ‘ssc wi your an me Toon, youre er ba he wer re othe ssnor The cmtinton oe to heh by Lins verify teat a ‘tied en. Paswons 26d on te 0 wether pert Syston Le as Z Shel Th Zl oes fees of Teh and Kon shel nao, ponies lage ter ofits an exenive Scere The xc le ame fre Z hls a) Beginning a Linux Session: Logging On Ys the tone programe come oa omer ring he Lin operating em froma ompucs runing Windows 9SBRINT oeaig ste. Yxcin kn ie ‘ince mwa by ping he flowing command at them prone fen tosmame oe Pies Foretamps ify were woking ona computing te Windows 9 peaing st toe COMP ues sige oe Linc err were 182.1601. You nul sed ‘ete follwing commando connect he Li see ‘Afr yu comes othe Lins ere, amesaesnilaro bean shown low wuk! pete he se: sos ter oe ORS REST eae os needy ax Operating Systm afro abut wes has se umes ad paso is oe in he shaw a pas ies inte deta. When wer eerste oot peso ‘Se te and psn cack in sha ad pad ies. {te Loan informatio roid by te er ds nt mathe natn ath sha pas ie, 8 err mesa “Lagin cert” i dpe. This ck ‘ae tot auborie ws se sem, Whe ald er name seme, el rms dle on es. The el romp sent [Altes pomp ses ane ithe logon sae he wad current directory pane isthe caren wring dey oe wr. ‘Wien ae fogon su scat be distr ses ame deta othe we ‘Teliame decry isthe eta decry fester we the we legs I iy, gon rune sly hss ewe, a ei ome ctw, wt neces he ame rae, Frise, i ou se ae io an ob son name aso on ten airing oyu wills alvin on be © Ne eaten ene Fmt nr ‘The ee logon press pe jus a toe shown to: © See ach se san fan cl the er mee Be logon man, wih he ser es tomer wer he in: pro ape on he sre. ‘The septa log onto Liu eer are Avie Joan: pomp, emer ourlope ume an psn aro (user enters pram bere] ‘Security for Users: Passwords In Ln, te gon ces nae at ny etre wer ca aces he ope ‘ung Lins. As an dina mae fea, Lin alms yous yard ‘ssc wi your an me Toon, youre er ba he wer re othe ssnor The cmtinton oe to heh by Lins verify teat a ‘tied en. Paswons 26d on te 0 wether ver ‘opraing Sy: a OSES V Ei eaneomenareerat cocattestenmrsnrecaeeemamerecs ‘The ymax to ass he aig manpages sas lors: Facexnpl he command cin infomation tot te vais ope of he eed sont Ending a Linux Session: Logging Off [Ace yabgono Lins he wrk ses ots ti oui! te she emit ‘he seson Typing exe or 000% atte command pong ens the coer Lint Sesion Youn ae. 19 eo ei sen. mower phe fils eae, you mse your Lis so, oe: wet we Gn psy came ata et ot Ft O34 ‘he moter Fr ena wot eS, you ey Se whe Soaumnan tg oe ee ee a - a Inaction Ln Opa som Summary en ‘An opering sys ines oman fom ewer manages pee aloes ‘ner. mags appa (DO) open an peel ad manage i ing ‘er sem cn esd by em eso at ine, MS-DOS isan exam ofa gle ‘oe [Link] syste enables eo we wo sina Lins anctample os mks orang sen. Linx acer coss of kere el lt, aplton pograns smn eure anita mappa, eso alin tal ety, Sim, Con cheering and Wd eee, Some ofthe combat stil ssn Linu the Hours i Cl te Kar shal he este sb he Bas sl he Teh le Al dt Zl ‘The cont cna ele amet corp sing Lins fn aabee center nang te WinbwsOSBUNT persing se, The pass comand et tochunge de pasword he wer The cont wt tas perio con mal ea enfgaersoues on he Lint system The oo Logout eo and end "be caret Lina son. SO FN MTS NE EE NL. Ee | ___ Chapter 3 Managing Files and Directories Introduction “The Linux File System | salar cn ste dat in te frm sind of le. An peing sat roe lc sem onic ioe fies Alene mec wy Seating sem we ad manage sad dei 0 a sg an. The UNE fle stem as fn ht wa st rab in cher oerating sae. The LOND fle sem as ich rate hs eles you to ae sin eons, Dict resin the dave o's Hig ict deer cons ls, ch conning star deme, dancers canbe redo ask sees ut onan Sarat. ning abet se Species aes or he aver ae an exe Simi, na UND fle eyuen wera ie dren) me sn te le be ced a eet. The ey ae Linu essen slr at of UNIX Fie spe 6 pentng Syston Li eee Fw 31 Si Fey Inexc dio, is coining lad das can ese, The anni of be Lows ‘praise can sete te recreate wr nthe home isto. Fo crept om cry th ame Seer ort er om. ita seal sn Fistome deo tm or cet dees nthe oe den: “The ditto nis 9 es, program! a pga? and eo Secs Dep temple The Des decoy om vo fis, Deal clr ‘Altec sred on he sdk in min decay ih scale he mado: “Te mt coy is sie it er cars i, ote, ae: Maragra Fes ane Drcorne Sexe ects dco ina a xpi tel, ach of ie ect i mnie or pc ype of en 1+ The indy es mays vale Ln. Thee ilies he commands in he Lia persing ye Th ky th eh wie ‘alae Lins stmt bce ese hey aa +The le diet sors al be vise Fes fr be Lim pig sen, 1+ The decry sorted is he ope a, instante seni pening se pan and ofan ccna ts and the orang sini nd reer ogi ls, sch psd fie 4+ Th ib cry coisa irs he comple. he Cage rates, italia Lun opeting en + The he diecty consis eo dst fal be we The ardor sesh peeing semi ht ent reid ig ie sap proces. The decry as crise i rey, wich ses ‘ny, Te rin dct io nti onc. 4 The are nis imation ci ies avila Line or exile, he ro dresoy contin les ats th pag spony Ina le se herr. le iso by spa, wich consis ofthe fil nae ce y he ane fe dsr cosine ile The ah ca cont ets nwt ne ey cn nr dry and onl a “7a ect Te le name ilo Sse in path ae pus by ie symbol, Faresampl ne prvi fou ecole ptht ee etast is hone/ eaa/Desktop/seart Silay. pth forte le 12 =n. Noe tat Fs i i hace ad cant endian as ‘na inci ined ee ie srt, he pring yr oie ter ccs 0 estas rus ois asked fan each ee Totes price ‘qs pes ear a eed Alera ao str al the i este in the mo doy th opening sts cso ah te ie it tie ene aspect fe woe UU Un Umer uu unUnu pean Sytem: Lnue File-Naming Conventions nis lesan: + can coin pil nce xen + can cota bt pert nd wee apts + shot cn aoa ah, Qa ana O thieves eer Relative Path Names ‘The caret wring ey isthe cynic ou ae woking in Lins. We ‘een a lesen of cig compe patho ee you can spe te path ih rton yn cure anton yo do at pel the ph in ein coma te nama he corn day oaks Consider he lowing supe incr sn gee 2A Spl recy Se Fores, consi at ewer Seve is wong inthe ety /ome/Sceve, Sine __ Mansons rare send ase thle fn02 inthe /nome/Steve/basebat decay To aes this fly aig he xe th, See nel spy te pth as hoe bsseball/[Link] Sev an pec te eae ah fr te Ge tal /jant2. sing alive uh aces le moe coven ha 0 ‘pei the cones pt ‘Wien you begat pat sane with /, he nan i cose an seo a comple ph Howes, wht he pth nape eis wi arc cme eve uth inven he cae working dnc Referring to Your Home Directory cath de ston th re tne ng soe Wile wing oe Li, you ihe aces oc ome decry fee: nia, 0a spe th pat ero hae det ying he (sgn Free terest [02 fh Se can sie le ane Wi path 8/2001 Sano fom any eon ne fi on, ‘Types of Files in Linux. nL oman toed in fis. Ths nadine’ rogram an is, heal lsat cnn infomation sot cry oe or sens pl uta devs oe te Linx oper eI Liu devi i le, ‘Taf, infomac seo eval dpa et (VDU ro af ner being eta fle Inline, trate psf les * Ortiny + Dissany + Speci Ordinary Files Al fils rely a wer ae ry fk. al i, prog, ie, and excubl fs. Aer an moi oda les, ping Sytort = — Directory Fles| ‘When ou cate adic ia Lins, 2 decyl nly eee ye ering syn, Te ete) fe has thse anesthe cy leona ‘Scot sou he fis steed in ede, Foc example te dcy Rarer oni cry feel Siw nthe din ome This de) ois ‘norman so li lesa ces nt Ses See A wer x m2 teeny ie However wien le cr ioral the hone dnt. te ict le eid somata bythe Line oping sem. ‘Special Files Mot a he stem le in Lins eps le. Spi Besar nly sociated with inet devi Spc les are soe in sd Lin cr, uth dean / fA ec cam ly pc ls nos ps the fling ype opi ls Orc device ies + Block device fles Hains + Symbotcins ‘character Device Files Character device les a rea we dan, one cance a ine. A or 38 ‘Sample cae device lk, Cre des was hows a seni evel dei. Block Device Files Block dice fle can ws oe ck fd at ine A Block fda comprises ier + Side D4 The eel mae wer minima fone lk fd aa tie ‘Te kel calc dain te menor ndthen ales he a walle 3 wr: Block Isteenectios farels > Istetzenoe 16 i > Isteesloclioet > ‘The swo perio er othe rent ety af creat decry. Na tayo el spi age bec he wr nd tho pins meee Psi ‘When ou pce ed cman witty ph cuneate Sis te one dt. , Euamle Iseevelacatost Din ma snerbin > Iseveecatioat bias ot Iseevencenoe seals pat y rae Isewselocaliont ster} _ 7 TnL he sgn dents he compe put fr bchowe deny. Forex sume > at re are wo dees uel sol bk See ae ncey ensale \cevenscatont stel§ md Jes psa Stree (atevesocatoet seve wa ‘Youcan to as anbitin ofal he ove pes when xing te comand Fe ‘aplet enitch fom ere daw ety dat, Stewed 0 9p the {winged aol svaiostont aaa wt eveslocttst tall¢ of feat Isevotoeiioe 50215 Creating a Directory ‘ume ml ak ds) cmmand ocr iets. pay Istenocanare Steves air pogSee (SeerenecaboetStevelé - ‘When you sete ove command, suber pro fl is ate inte cures cay, However tne descr) dos bce cue itr. Yue ako ‘es te cae pb wih enc command Buanple Istereloutost stowl6 me empleon- ISevetocsint steels — Inte above example he deci popes iceman /enp decor Removing a Directory “ute mi enor icy) oman enove a pec decay pe Managing Fes and Oreos ample Hoe, pe fei eke oc st cop ah i x mm ae Gmc seats Tes oma ere eo ty, i it ee ie een. Listing the Contents of a Directory You ete command dsp th ame of hs and ccs ht este in ecg. aie Isteretoctiot Steves Me maser Besicap aout daeetbltpo‘[Link] Isteelocaltese Sew] s Inte sbve example files nd cto inte Sie dst ate T phy eft dee nt cue ee, ede gi enc ane wh Ine above xt nly efile names ad tei ype ae pled You se th 2 rn wih he 1 oma dpa aed i esa ces. xaple Isteenocttot sevels 18 eaarx 2 ftom Stere 102 Sep 21 cit taetatt ewne-x 2 Save Steve 004 Sep 31 tei? tedkstatl aaa a ee a ’ — es errr 2 a PTT TATA Sas a Ce errarer —— eee eee ct ee Se RCN Ss See — Fi yp ne oe Pome FP) i oe aa ‘A poup isa coletn ef ror ps who sre comton abs. In Lit, he we eno wes: lovee, ou ores ater er. Te id woes tice i te eat fra. The it hart of ona une I pectin thet of file The folowing ute expla Ue smal an te asi fle pe 2 Fein “ican ie hide fey its me, Te nae of in le bei witha rod. ie hes a oo pled ian cyt To Cpl ide len yon need se etn with ies comand Wen ing the 1 em ou es eoine are tan one prance: example sng cupat of he 12s) soma i dpliyed ‘Ne hat ou ca ao pe cord ass -o -¥- ume (seemeloranoctSerels te mL steve Steve 235) Sep 21-1812 tas Matory mere 1 Ste Store 24 Sap 20-1340 bd lowe coeee 1 Ste Stem 230 Sep 20.1310 cath prtile dewraex 3 see Stave 1m ap 20 Ltn ae Searar-x 2 Seve seve 100 Sp 215+ batetall eve OOS emer. Manag Fes nd Dries oss yor: Une : oe ht th fi wo tre ae presen alc dec i. A pei.) ‘epee hc ion, an vo psd.) eet epic. The ‘iso doris ae then doves Wea Sou pe ec» come 8 Sich be pet eso Ths iba. Sty at pois whe are ‘ren. File Commands in Linux Displaying the Content of Files ‘You the co (ems) commando py he ten of ie le, The et command an vray cont he ett fae hn coe Bl Bape Ietvelocaltost steels When you te sve crn ts se ha he le sia te cure theca. Howerer you can ab sect compl ah oily 2 inane fire. ‘Yoscan a ee temas spay he coment of mrt en fk stn in ‘efelowing comma anne (ereocanos Steves _ The head and tail Commands ‘ou te a commando dp the Spite mane fine fhe begining of ie Youwse hei eommando dpe pied amber ois te nd of i 30 dost est apne 10 ins ae ply by dea Te sy fr bh oman a pines fe ae ‘afin [eae ‘You ete haor ta carnal dips ceri mmbeof lineson he en came hod fts/asoet ‘Ths coma says he fis he es rs te esaing of he fi eam Sameot hots vile Wh eos command ae ge elo: ie 34 Osie fe ds and <= an eer i a i = Dio an Exaple Tis emma splay he tw fs om hot fhe = 2 command Eg ———— RR sion poring Sysan Un Some of he oon arial wih ei command venbelow: ee nr ea Cd ‘ier a an Be ‘Be ai rn to One: 6 ia Copying Files -Yaucan ehcp (cy) smn copy coten oft sue filet ae sym plo sore fe desintion dctayle> Baap Isteveloctoct Svvels cp ata data Ine se exe, te contents fhe daa le ar cop new da? de le ey exits cote wl be vein teenies fe dite. “Toor ies ss dcr, you mo pes thecal pat with cp command ‘You can ao oy desta nd les al suber by aig the co comma wth opin ample IseeenoeatioetStvelf oof tg emo “Te bone comand pi te en decry nda is lesa wecireso ie temp dnc th tempo deny exit ll he coe ae ad ttt dy. Tite ten decoy ent ex, seated nthe cue wring dey. Masons becom piso tec cma nian a given ow: ‘He Onin i be mad mbes, ‘nes a iy om ae Removing Files 2 ‘te meme ee dks ics » sy leon . eerie , (eevee Sel é om a tad , ‘eestor command will nore the i and dat? is fn cat econ, te file be dete is tin te caret dicta, yo te ope te cng path a » USeeelocaion sem rm fom/ Serene ‘Youth on wih comma Lape sore ine remo int alog wih , nape USeewelocatiot Sewer tego ‘The ahve command enor te eno dey sn with lis abet. Speen Syston: Lin (comma stots wih he comand we dpe in he wl below 137 i tere md [cee ee PES | + ‘aso ys at a al leconsonatnen ont = A a Moving and Renaming Files ‘Youvestie my (nore) comma maw ier dnc fm on aon osc o rene iodo. Nt tat moving fle ater lot ie on ‘opyne tee, When jou moves le, ew le ot cea. Syma 1 foi sue desinson sample (seerealestne Stee § wv com cmmuniacton Inte stove exam, the comm dcr nando cmon ‘You cn move il fan dtay oat dit, shown bow ame (etveloctont sews mast one/ See eeane/ Ine toe expel da? ie moved fm te cet cry oth mee! prvrans decor ple ISeveeocaiec Saves srmuniction trp Ine tone exp, te ditty op exis inthe caret deny. Theft mica try move en caret eect Whe ep ec) a Mori Fes andOrecree Some fh opto aaa with man ae given low: ie Osi em mand ox eaten 1 {er son tome oe et PON 5 ae ho Displaying the Contents Pagewise ‘ste at comnant display he ot leo te sen. Howe if be peed les ap, te ne omen ote le sro ap th seen To vw ale oe ‘cero in, you ca we the be ees ams ‘ou te more cman ply he omens ofa le ne Swen atin When you iow cone of ibys mre, yo canes wafer cling Som, Syme refs) le me Example ‘he atove comand days a pape ist of cones fel, XW Ler owro, ‘Sime common pos fhe oe naman and he cies ens aA dni em Com ag ne Selene ich eon ta ————— anne oR | Rota ae ane ‘Open Syston = ae “The oss cummin isnt the moe command ese ht youn emi op we Wiewing te crc of le I ab, th 253 oman ase han he ‘seaman Ti rae he Lens command cepa enh dat he meen. “Theft ta arabia med yu can ep addon seen fa, Sys es fin filemne> same “Toe aor aman displays ages sf he omens of ee Whar HowTo. ‘Tommveup sot down te seen, you ca eth ao kes. You cna sila remove ow teen Tot te Spy, you ned the ey Sime somne pon ofthe 1 commana hifi gen ow 1m pst ea Coad wildcard Characters {Liu you can ef an prince ase of ls wit pci al he anes ot se wc he operon tobe permed You can we pec hacen be cmd ised of a imam Te stl pes hse pec haractes,a own a wid chances, asa sie te of characters The sl the copes lle fenaes web ety Speen econmod ese fe nae ht ‘nh he ter The cma ec ler wine mane neh e ate Manageg ie nd Oresase ‘Tellin bless the wierd eile wia expt ofc: oat Steels eat ot er, wl ch he ik who aes lat wi ‘osama repeat + widen econ ie. same “The soe command ipl ie ls ha gi wit hap and coin ay eg of «farce rn che, five by pro flawed by ny sence of chacesor ‘chun Na hat is 0 pcr ‘The ? wildard The shel ips he ? wierd aa tig feat one acre of any characte namie ‘Toe ate command py al eles at coin ay char) elie rnd fllone yl chant afer th prod The [] Wildcard The {1 wiliea can te we rei te racer toe mache Example Iserelocatto savels et a3) f Costing Ser nse Te shoe coma dpe he come of fle wih vo chante ise saring ihe and wih be ent cc 12, 3 hao, 2, a lft tsar pan ame ln oa rane TA tabby rcp he margaret ue ere ‘sire ng ta hoary Aw by, en Be {AB oy cpumincn atta ane ha ase ie © Ree Frearoe Summary lesan str esto nd mange in ius y wing fle sytem. Thee ae re ‘peso sn Lin ry les tary les and speci Fics. Thea four peso Won Lins sen adaisr orn ser eowne ep ove nd er Se. ‘out pr cormand ody te ate of te caret tn, the oma change the creat story oh speed decry ct» oman © foveto the pe icy of ecu ey, ens command eae tics sie rn soma o eno apc toy ‘onsen tpt manes of ls and sabrina decry: he at oman nda the coment fect le ne soe: he eo command ‘edly te umber of ines ci ote Degning os andthe oman tole ue oie seid fen ef fe ‘The cps eo cop ls or one aon ae ther comm Asoc ee dst an he ny ames moe is an ects fen co Iesonoamoter Youcan ai we i a commando aan dees. You tet ose and We Loz cniando uplyhe omen ea lene sen a ene ‘oe wot caret prorat of persons on mip fis In Lina, te vila! cen yon can we ae — Mich one ae cance ing a ‘hans? ~ Mnces erty on chat: an sf] ~ Macs xt neo ‘pet st of chants | yuri Chapter 4 Creating Files Using the vi Editor Text Editors |Ateteliorisa pam tel ou ree a8 meet le. Typical tune rove sagen wha fe ine eh and ie names. You can pe in by Tne sgn hogh ie docanens by us feet oman nd ae dee ove, att ear wally eis fen by wes xe word presen tren pmcesox fle lon ores, sch text mating You can ese ex elie + Crate ad eon Crate progans wii Wit rm meses, Functions of a Text Editor "ply teteor ess you perform te lowing anton: + Cae file Youn we atest ei cet, and sve fle. + Open: You pen, a sve an exis len ae eo: Yuan tle open maple cnet ine y wing a et ei + Capes Tet eon alin acme ceive eset ele ou pF nd pte et + Seah oe Ina tet itr, ou can ear fora pac exresion ra ‘rn Th ce you dont ener th xin oe eared fr, you an we ‘ila cre ook he express. In aon, may elas rove the search an ae fee The each and vel eae eles yeu ‘hang mp ian of sparc wondering. persing Syston lw ee Editors Available with Linux “ply cach open sem (0) cde eee Thee ae vis eins ‘wae, Sone tres th ising varios eda one ‘pane pect of peraton Sere fhe cos las aaa nL ae ao dict “The vi Editor ‘The ima eter, oly kn ah ein feos wily sed UNDX- sed ent edo oles cmc ner and esles yout cea de sem ‘Sieh [Link] vedio omy wed ese eit sour code and wie ‘The vin Editor “Te val eer improved or ie lito neta vio of ev ie Te vim riche aro creme ner be eg, sch as yt ili onmang-ine cing, nd nine ep. The vetoes te sett AST et. is ‘Spill el isp ‘The enace Editor Ancer widely wed text tor tee maon a ccs ein The erm ie eos mich rg st of oman a eer. Yu ca we ems tr © Fert ecole propre langage, sachs Cad C+. To be wa ces ination sn commode aan he nc edo dys nine ‘The oa Editor ‘Yin ic thine ero ceeds, moi, and se tet ls Whe ou oh eer wha ile sames an ame, ey ofthe le cent true Ya cn make capes onl ote copy fhe le and ety le. To Save cangs tos fi you we te cman ‘The rea Editor ‘ou cn use the marc eor rod et les in heuer You ant ect comands yw he ete. Es ___crotog Fes Ug wiser ‘The joe Editor Anaer pl elie he oe nm aro Se. You ea ibe he jo sine png jo atte covenant. You an slo gv le ame son ith he “oe commando oe thie te ene The 3m ete lc di at es jo eit th prog anit ‘The pico Editor ‘ke icon is halon the Pe msn sytem. Te Pn mesg sen a ‘és tse ine Lit You ean te Foe mesg sie el ad ‘neve ema espe The po fre aro eas eng pares ifetion an sae ees a alton he co ear oi apeting ck ad Ale ons: nthe po et, cman ae play atthe bt ef the cen. The ico alle ao fer cnet sete help Ano te an ltr and ence ete mn wil We The vi, nace, oe eos a dase nhc The vi Editor Tevet vin er wet crate an ees kes documens ad eran leis te contents of leon fe ren The edie isoe a be ee cts ‘alae forthe UNDX parm Initio, vi ae ale fo allo e aris FUNK al Lino RedHat Lim, ea symbole th vi i, Tasso a stat he ie sine ping thc, Adios, te view conmod is antsy kote ver ens ed 09 fein te eal me Getting Started with the vi Editor ‘oc gv the toring commande Lins prompt aol ev i i fenne oA eee ey eT Cee eC ee Cw rainy Sorex _ ame Uooteoatost Steve manasa Inte shove example ithe mesa exists th vee phys he coments of te Fonte cen acon fi mage fe dbs at ex he ene ces he and pls folowing sen, eee ae rr Fes Ugh anor weber th er “Te v etr ma into made, sn command nthe it mode, ou i let 4, The vi elitr flew commands a cangs end delet. Inte ‘mma me, ou can move ue, ee ile pve ous aids mamas. “Tswich om te ne te cmd mode, pes he Bs> ey. To sit fom the command mothe et odes A 0,0, yer Thy. Commands Used in the vi Editor “Tevet oes comands tt you cn focal eg fis. Tees ‘ren bl date eons of vai commande ine vee ‘Commonly Used Commands inthe vi Editor ‘Tehllwing able opin sone e omacnly wed comma vote =e ‘Sera gh te ro as wna Fy i Insert and Replace Commands ‘Te wing desis he commands wt on a epic enter ee eran a Cmts ies tie oi et 8 bv it te " | so er ion th eect er a oo hye eee paring Sytem: Lu = ‘Cursor Movement Commands in the vi Editor -Tefllonng hie xpi te se corsmovenent comma sg Fils Lrg he ater ‘Commands to Copy Lines ‘The lig bi exis th command we co nes: ae Cen» Cy es Goma [cer na rn pea oe Brann win =] ‘Word Movement Commands ‘Thefllovng ube desces he wor-ovenet commands Deletion and Modification Commands ‘Theftlovng ble describes the commands er deleig ad osying ex te 4b ani Cd ‘Wile meting on fi, you might eel apy sos of ent oxen copy 20 lites te fm le, ive the 20 ome Te 2 coma wl py 2 ines of vest sig fm cre i Pattern-Finding Commands ‘Tre folowing ble dosstes he pate Snng cond tev fie ee ag Con oy Fe est aro eae a et a | ‘poem ae | a i te ‘ean | Ra pr on ep ‘The v in ofes cunmahat rbi you tsar pce pt in ile Fa cumpl, the Customer fil sores edi of nme wo hve ered wih ‘ARC Teloraminctons The Comer fila flows "ey via Tea aba cena cater, oberer 1800 hice Ct pean Syst: Ure Pee ee Croteg Fie singin Eine To ech fh word asa you slope th / command The net insance fhe > ot Gee gh cs | The emacs Editor ‘Te emis edn iano wikey wd text ltr flrs mie crams tan he eae Like ther UNE tees tomas of cota ey Cceintos tht embl youw cee ad ml tex flex Typ th enacs ers ed w ype sou cal or prog ‘he ants eis lows you wok wit ipl ik atin. Ine onacs eon, 3a can wich beter es htop ed are oe indi fl. nan e308 ei ofr eel ul, whch nas yout cece meine na desu. ; ‘The enac ein ofles line ely. The omnes eer alo ara bel you Taos thwart ia To acs he rl pes he veri take desc of he como com Cronin Fes igh Wer wee ee eee Uee eee ees esses Soweto i commoat “An eitors rogram wel ret sd et fe, Sm of he most common Gionare vir vin, emacs, ed, zed, Jo0, and pica, “Te vier can be sce wig hv command we in two mids, tant onensod The hy ido evi ween thet ne and conan fle The enc: ei ante vey posi eter aval fe Lins The = edt (ate ike whe jon command —_____ Chapter 5 Managing Documents Locating Files in Linux The find Command ‘Yousef comm locate le in pec ryan ali bce. sya tint (ats) toni 1 ‘Wien 30 ee find command, yo ad pce path whe ks eed ‘aad ey an exes The expression cris opto tha he ein of hed comand. Tom an ava seach, ou ee hse oes ‘fein oman. Same of he pos of Sn son as eine lon. The -nane Option ‘Youth mimeo pce i fe es ht you ned os ample one towing sm 2 fin on/p fa Hex ome sth same oda ia wich sie is ed oe The ‘une “a opin pcs hat al he es with na ja Be ch. peratng Syston Lin oni he le erty fhe ome desta awe Singer Se ‘Wes yous hein oman wot tease pte amma she th mes ofall ie cid ery and hier, This Shwe ine angle elo: tn cael steve rome 2800 ‘roma eve ‘oz Seve/200/308 ‘are cee ‘emetee/ 8.3 Manag Donnas ‘The ~type Option ‘see -tpeopoto eas ee pe of fil Carte comand given low ‘Theo fh -ype ears ee nay fs. Tos ir det les you tent tiptoe command ‘The ~exec Option ‘You wsethe ee opin speci heaps he oo eer te kes hthave ben td byte fi comand For example you ci enor he fe ht ‘geal op fal he dears ude pec decoy Too his, yo eo pete foloningconane ee ae Inte sb oman chord le ae on isto ved a Ste’ caret dior anal ie When yoo wee ete opin, youn spect te (inthe ya. The find and ssl wit ph anes of eis hich road he comma th leis ove As pr of he sts, you asad pci hci footy seinen a te nlf teen opt pce ea of cman, ‘The ~ok Option “iu ete xe oon exe x commun nec lee ye fn command Youn ako we the pn oper te ls mate When you ue “skp te comand rnp he ser fora conimadon bef cei ecm Soren fe The ye feo opsion i sini tf <6 oti. nme ‘olathe eds, you ne pete fling cman ti / ean “Tove omen of be i, you ned pee flowing command Fuwrveereveeeee wee er ee ww —_— per Syston: Lie Standard Files cop ten consis any he psig procesing ano dves, The lng deve esa oma wer nd hota device pays rin ia sy ror menage ht sw seem The prcesing device cee ter apt ‘ecorlig othe Seif instructs geet he delet The key and ‘ont ae example of tpt eves td te cre ad he tert eras xp ‘vies. The CPU i the presi devise nthe Li pring selling an ouput devs acne pei fs Standard Input File In Line, when yucca oma tues apt te sel ines command ‘dass he fyb a the dfn swe of pu The keyboard ws he Sonar pa fle et wcomsr he nal of te at command Whe 00 pc the ct comming wih aflame al ines nthe Flew dspye, Hower, witout fle wane eet ‘ema es it Eu the nl i He re hee shows bbw ‘Te cat connod was rapt fom te Rs. When you ecard press the ymbolnpes ection of ecu the let. The ut ota ‘oman is widen a ik fle. ‘nouyt erection thle hich he opts ice isis cree he i os ‘eng fl oe thot tte le. Howee he ies comets ‘Bo free apt writen Youcan ako a be out of command he en ofl ins feng the sisting coment of ee, or taro pend eo thie you met ‘eden conan ‘Youca alo wee ca comand wt le desir a olows ce, > indats ouput eatin Alogi deo is ees, you can ince inte command frlriy, id Error Redirection Theloving example expla ere siti: Seat datafe 2 exror-mesg deer» Asume ate Fle dale des ot exit the caret dng. When 2 wer is ‘cei abve cond Linux pees a eer meget nection sence eisai emer sae wll abe dyed on te se ena’ ‘or fle insead he ss wl be wes oh ile nese ‘ut ie pt einton err dain fi crt ile wc te ee meses ‘ereced an the wes te err up oe, pring Syston = jes ManagrgDocunerse Gander [oe % ‘The loving able expos he apn the ne ie: or ir ya ae S2: mf en ite Options of the grep Filter ‘The gop fier ofes ott el yout ae te apt fhe conmad The pons rae wath Bp rae ows: ‘+n: You cans his opti wiht pop ier dsp exh ine ahi te ‘Geil pte an wih thine ute The ie amber pied a he exining ft £1 You an seth ply onl cout ft ines a eh Specie pce, 1 Youcan we hs option dp ale ine tat nth be ei ers “oust speci he in esr te eps exe, You can conn pon whi hue be pep ier Far camps acon benno you ens heme on | ‘The we Filter “The we fis esd ont emt, net an ears in afi Youcan Aho we te we iro out th samkr fins, words an carats ype y wie ‘sndeditutie imax eve) [ester 1 sample “The fie sample has 2 is, 7 wns 29 aces. iw Ses eo ihn ene ves ‘Wen oud np ian ihn fe ee ap on anid inp fie, as shown below: ss ‘Ate you pete et ei i pes eerie. Wee ou Be tunnel hrc at oe ccc Tew ey Be tnt fac wes and cate to hon re sop ecu A cae of thee ier ore te sd ae soph at ee The cut Filter Thor nigh beste whee you redo extn specie cans fo fils, You can we th at ert xt sical is nto, yo an ee et ‘bent he apt of ea command, ih and win Syma x leptin) tstenue/) ‘The vig ble expigshe opin of the ct fe, es op er pring Syston = jes ManagrgDocunerse Gander [oe % ‘The loving able expos he apn the ne ie: or ir ya ae S2: mf en ite Options of the grep Filter ‘The gop fier ofes ott el yout ae te apt fhe conmad The pons rae wath Bp rae ows: ‘+n: You cans his opti wiht pop ier dsp exh ine ahi te ‘Geil pte an wih thine ute The ie amber pied a he exining ft £1 You an seth ply onl cout ft ines a eh Specie pce, 1 Youcan we hs option dp ale ine tat nth be ei ers “oust speci he in esr te eps exe, You can conn pon whi hue be pep ier Far camps acon benno you ens heme on | ‘The we Filter “The we fis esd ont emt, net an ears in afi Youcan Aho we te we iro out th samkr fins, words an carats ype y wie ‘sndeditutie imax eve) [ester 1 sample “The fie sample has 2 is, 7 wns 29 aces. iw Ses eo ihn ene ves ‘Wen oud np ian ihn fe ee ap on anid inp fie, as shown below: ss ‘Ate you pete et ei i pes eerie. Wee ou Be tunnel hrc at oe ccc Tew ey Be tnt fac wes and cate to hon re sop ecu A cae of thee ier ore te sd ae soph at ee The cut Filter Thor nigh beste whee you redo extn specie cans fo fils, You can we th at ert xt sical is nto, yo an ee et ‘bent he apt of ea command, ih and win Syma x leptin) tstenue/) ‘The vig ble expigshe opin of the ct fe, es op er > Opoing Sytomeinee ~ . sais )5 cut tenoray ear porting yes Line Inde above cumple, i + oof erie orks 0 ach esr an res mile spacer wih ing ce. “on can aoe er iro gee cg of te. Ean See teats sate ‘Te stove canal cone ll overcast uppercase, when he ws pes the falovigsoece Pipes In Limx, you a combine es with ater Linx commands, sch oa 0 ha te stn np i on tro coma in be se as andr ito ote ike or ‘conn’, Faresampl dp le cones of caret dict, you nee ee ‘sla ean vor tele ere he comand te is of te Scene ieee. Te temple le the eds ig th mor commd. ‘By ming the Ln pf, be tro ap can cried an exec a © ee iineeiinpe aaa oan na Manag osama You an weep eet perem canes sb combining the coeds valle Lind We jou tee ppe feta, you cn pep commands ‘ites To mestndhow be pe crmand wks, coe de tal a be few elo: vee = me Lowe (Gee art | (im vee ewe sie aoe sages Te folowing sa ape oper of ek -leomma fra atx Stave Seow 102 Sep 20 23:30 bectop ew 2 Scere HIB 1at p22 3000 ml mere Later steve Sf Sop 22 het promo ron eve oor oe cas ei fa en bw Tite tees ofl ota sin come deny, ye med ‘oowing command: a ut wee eres eoeos f poring Syste Lue Inthe above sya out o the lan i prvi ips exp consmod The leona splat st he Ses ite eet ey The ‘pepconmc ext al he atay fies Ths gps thn ie ote coms, ‘hich eae maple ces wt singe spe The ct crman sh pe and trtmc eth el ch ste Smead ps ee ae Td the ie manesin te ce dso alog weh iflesi, ou meso tefalowingconan up apes Suesitatons wer oui sed eer nd er senor Comer caer fle ed deli: senay 20 tale 1A ‘Treatove fie oma consi phi er nd ses se eth cans, Consider iy at iets aly cma dite Youn se etn ote deta | sch tte deiner isa coma, Todos, you must pe te owing command tar ices Aer hiscommed sexed he coment of hele dei? wil ema flows 1 Cand asitatio whee you needa each eh sn, “er inth a ox pi al cures on een page mise, Too, ound pe te faloingcanenn The tee Command nLite meme capt in apie is tse he dk Hove tins, ou "ight cto rae the snl oa oman anc te ‘npc on th disk frre. You cn shew crm ore he ear apt ‘sd ite itt sad oso le te le which a to este dos we is tefl sce yh oper yer te ext cores oft ae ‘rere. You ens thea option ape cot oa cing He aan ‘The stove conmand days th coe ofthe fiom 0 th sn sao wes 0 "he hs oad on sample lather comma the fle mune sored an he aed dt dtd oh ‘ee commid.T te ima res he le sorte and res ie et in fi The we comand a res et tpt te moe r Overing Stem te The wig fue dicts bow he we command wes ed ee ee oe we Shee Command Summary The tind emma a fle. Yo a int ip gt ade fi eta he tan ley ing er wi msl > toon cayenne) mado ser fy wing >> iat Yeeeah ah a ie hen ea i, an pay al inst oan tte. Yon wee ve er Stn ns we ands na ern ea ie oe Be Ct ern ent pec edomn oe np ean an sn rai fa ft tr “he pees Lin ed sd i sendin era wer gn ah anil ig the Gree er pop Yor eo ‘Sordi wet san inp be sd aptr ors oe — Chapter € Securing Files in Linux Introduction File Access Permissions (FAPs) ‘nar vinmen, cht Lin, mie es wrk ae en emacs, ‘Tis es sare sym rors sch he add, mena an ave mee {een Therefor, on of be npr aks nant to mange has sn dees ofthe wes opr, ach rn te Ln ste said arin ane, ssw and gop ot {Eero whi he belong Contato ng i ut cow ae ig 208, and al of ou ae mad i, rent tHe Oke vrs no have cs tis Todos you can cates peg ec ‘se wekig an the peti his [Link]; ou in papers speak these of hes so ht ty can be aces. a Liu. fil ces pom (AP) ep wwf eden. Fle acess! amino efertothpeisions sine wis le wih ge wi flog: + The fle omer The gop one Oe we ‘Terni tata pated owe ae smal pnb eter Yea anda goed tater sr fr diet een ain ‘he pein for oa dey a: Tn th ed pein canbe peed by he sabe lost wi emisn cate ese by he rant, , ‘Innes the eres pemiso, Kes be eerily ema pertng Systan: n ee ‘The flowng ube summarise es persons sl fr files an dein in ‘espn | eon eon = ey Viewing File Access Permissions Amn eit ou nnn py nee Wi yw be 1 opin “1s command, the command displays the eames of files with the date and tne coma, Score pro od pio ap anes pcs Wc baa oie Esa sii rile ase Sect Fes iL ‘The fin chrcrindted he eo Fie, ach an ay fen fica en. Tenet st of de characters ply he ewan exc ost, Ind oer fre fawn The flowing te charac the pence oe ome 2 he save ae he pion fr eres emi araishl0i dpys ee alypten is diplyed {nde cram ahve fr ie ao, efi ovneris sized te awe an «xe pesos, hile te pop omne aa ewe sige he ea ad eee pei, Fr dere, you nein FAPS sows: The ma permison allo er List econ of ety ‘The we prison alos er * Copy Serna dy. 1 Remive Sk fom dco. + Rerane efi it, 1 Maes sic, + Reve sec fe te decoy. 1+ Move fi tad tom he deo. ‘Tiere pein allow + Cunge oa dsc, * Depa ale in dost, + Copy fl fom ect, Changing File Access Permissions Yess moi he vcs permis aod with flee dea by xn te cod ‘ommand Howeve, ny he ne as ie can change the pens sencced ean Youn se the hod commando gt or oke prisons ress deans. miso canbe gan oe: * Fe omer psc ye ete + Gi ower, mprsene yte Kte + Over wer, repress ty de ke pert Sse = “Te pemisbs fr le or dest indoe te atsta cn be eed one fe re dc. ‘When ing he cho command yu seh sigs pm emis, a te -sgnt role prisons “Tey fri ca oman i sown bow sya ‘hot de> lemme ‘Yous hecho somal oi he ae ein w 9p of we inte ‘sowing way ‘+ Symbolic—The emisson ante wer pe a spied smb | Alese—The pominioe pci a uae “Te fllovng onmad hows he of ie md cama same Inde fist exp te promot gm the ein eee thf ia Ine end ese pemionw we © Ur ct le seek fom eer ) Sean Fein Un y Tomi miss fora ile hee omnes pei 4 The ype of ur wie emis ite maid &. 4 Teoreofpemison tis ob mnie o + Whee ep oe + Tenn hfe or which emia st emit : Lasley dg FP pre ete oh oe ag that demmomsrat the use of FAPS. = ame 2 et 1 Bien MOL sey 2a ne 2’ ena ent net w 2b Here,“ infcaes the ile owner,“ indicates tha the permission i tobe given, ‘x’ = ‘nc the execute permission, and x” repens Ble name > ‘fer hove command inex he AP fre le will maid fs: Isteveoatost see tnt ne acer 1 Stave TORE 50 Sep 22 ast nc ) ‘Toremme te rad emis fom fe wou ovat, pte lining command [Stovowlocalhost Stevel$ ctwod g-r x.¢ . es. se pp ome nd “inert prin ‘Thee ilo pers lo ) Ine omic, yon yo rect emits ane es Uses en at ase ‘hw leon oct hab om eb pa woe seer Liew om te 22 al be > Tefatoig bl ine oni: meen ts ‘emo tenal emia mndcruen xnedunpetftrvig it Pcs Rein se ie Se > vs ein be em ¥ Soo ‘The permissions will wow appear as follows: " 5 ssi amee seein State > a ae a iu bo slows hile owner cing emisin fr le cee of wees + = i > | COU 6 eee OU ueuuND pening tom: ‘Toremone the eerie emisin fal he we, pe the fowing cman Hr, nas al ewe ‘The FAP orth file wil so ape flows Not ha al eines fx ve ben repay ype ‘Toa bese pein pin he ie omer et 7 te lowing cod (seereslociaet Steves cred a Afr cing the shove aman, th FADS eth fie eager los: (seerealcsett Stee Ie ol oe pecwra 1 Steve TREK 0 Sep 22 21:01 ne [Absolute Mode Ine sate moe Jou es er fis orp ie prisons Using he tut nde mre oven a igh mle moe bea ou an ei ‘eet ens oral be ps esi he ae. ‘Theftlovng table exp he amber hat ce cach pe ol es a: Ae if Romine ‘The fg elo dps a ape erestin fst mann Repeats ee cum is? om in 6 sume gr 2p pan oft ars secrg Ft inLine Conir htyou ted ag he el erin sn ete apy onal of thie wi he tenon our ome cy, Youcaasign pemisions by ig theallowng oem Isteretocttnt steve § cand 664 +/+. ee fit crt hon nd oe ifr ep on ‘oct fod Ranaut Te fling ble eps ome of eyes ht ello when you sey tur hoe mew he cba carmen i Mas on ptf ee Comet rae ap nt pre wr — ‘ge maa mse nbs ome © =a a on we ta « =e ‘Rape oa pr ew ‘eae penne pag rb = cm ‘ase i nes ‘ye mam pene anew 7 (seems ‘Ass na we end ere uample 3 sing ede mode wih he eh command, Sve has ain he el, wi ‘exc peminioes othe lovee andthe wie eno up etd ei ‘fre emp fe ‘The umask Value "Whe orale umask ae anh made ale erie il le persing Sytem Ln ‘emisions. The mode vale es all te se an el and wie pesos fr {le By dts be moe ya fr fil sn77 for srs et i ‘Todo ie ces pesos, th valu of wk ce fe a> vale By fa te uma ae i hen af 002 for we and 022 fr ts, wich mas hc ech ile case crates hse emis cee ~ 002 = 68s rere t [sou ace he sean te rope wre emis, Th rmiy up the ee by dtl he ou omer al te lest he er rete “Teun vale pci inthe cpl file Yon can we ums command eo moh ras alo les ed dcr, To ene hte fk lee Permisibs ane sos the vrs ein in Lia, be nae ce toe in the bok pre fle Wien ae Bash tls cei, he unas command ieee ‘tonal, ‘Thea ere ums cman is sho eo Sy as {vue} ere a ta uber of pote dg 30 ont psy a he mask nang reuse caren uns ae I os pean alberta he ps, he opering ste ome the uber number ha cous eager For example iyo specify a alba 7h a crane ye ‘yeaing stm a 077 ‘The ftlorng ube epi the eee esha are cet ying be cis ak ‘alr Inthe ale unas vales a Id nding oder ay ie Ws on apt fet Com le rc — fp oe —— ‘al och ea aE o* es eget ne mn ao @ as apna ee es Seg wenn plat: i sons Fie nun Summary le ces eins froth pein cil wih fil wih spc oe le ‘wn he Bop ee sd eer me. The permis ha ce pdr echd ‘se syaolealy pected by eke and we in Be a peso {dea be epesenedty be rumtr tates fhe me perma aden be ‘eyed y te aber 2, and nas te ee pein ana epee ‘ytenomer ‘Youu thes command view fl nes pesision (APY. You wet eho conmiod moi FAPs,Youcan us eco oman nthe symbol ad bie ‘ocd unk cnmand my hunk war sand crs ae a a ee << Chapter_7 Automating Tasks Using Shell Scripts Introduction ‘The Shell as a Command Interpreter ‘ese san inerneiry prog, wich ie the commands taped a he oaand prong The sel antes thomas tt ou pen commas a vdeo he eet The last a intrested te Ke! ‘alin aed ea pogrom rey ih he ke Aig eof he Linx opting stem ith al Lin commande exit site, ‘ise ilies abd inn ena of sytem etc aah in rain The el ene wer ce al ele lie nal races he When yu emer et te sel dt int rd he od neo ey ian al cn oan ea commode st wee the comand ine ia onan el ears he sci pied pt fr theca, When ‘est Gd efile wiht cna, exes fle ‘Thepoces of cmmand erosion ye sli a fw + Wien yon lant dsp te ius re, iniing hairy 0 + Wien yon ge aconmund he sal pom flings: + Reads coma. * Sc fr dss hf, which as te ae nae he com a teieciesconaing aise + Load he appz ty it men. opring Sys: ue a ‘Aer completing exe te el eps te prong, ining yu cnenier ‘be ex ema ‘Te folowing Fie dpc the rcs fel eens =" oe ae Pe Cnet i eh rte st amo file cron tothe comma tht yu eet hes pay nemo sage andi sly te © in ample Istevnocatioet Stave) 1 00k {atereeocele Sstl8| The echo Command ‘Yon wee co command to py meses onthe ren ample ‘eco “ls Se an eae of Ee ato com ‘The co command dls seco teen one seen. By defi, ie to onmn’ daly te ex a ter piesa newne barca he en oft The sewne ‘hart oes th cao the et in alr he tei spa T ep te car on theme in, youcan we te opon wih eek coms Ada ase Using Soa Sts sane echo on Te WD Rep te cure On same set cette Sens dplyed one sane ine a te up, Executing a Shell Script Ske cinta Con in i ao eG Lin cis ie ‘Seman snd eda cce Va ua em ee lc ‘pie You cal maybe arising, cl ps alow Farber carte popu. “Tot sc fk you ned wwe cman intext fey aig te ea ich asthe eo Af yo ct te sci fi ou nee exe i Lt Ol ou ‘rae follwing mane magi tt oe ed en: Inthe aif, efi io he fe infos esl exe he sri le by wing ‘eth stl. Youcn aso we et els, sch sh, ee, oa, eect sts ‘cr Wien you ces leh sd! chance shale te it ‘hacer of te i fl wed byte inert sl be wed eect he fe Fe exami yo nd Ln a epee fr te ip fl J 61 ince #1 /btn/kaa the begaing of he shel fe Youean exci ein er oft allo way 1. Atte conmand poops yp ‘teresa erin tee ine oe hl sr at 00 een, 0 might sine ‘te "No such fied” emormeasge, To eve te een, whee bas command ate pah o be hora ad pants cp. 2. Ate comma omg: 4 ctaod ux mate 8 -/oagie (Change FAP eae th sel sp x peeceeeeeeeceeceeeoeceececere ert Sto Lie 3 “were el sc ety a he 5 pep 04 ne change the FAP fr be sere Fi Wes you acu hee pron, you cn exec te shl cpt Wp sine ste © pong ‘Wie yor ote Lines, you bin wrk in copy of el, owe athe gn bel ‘sds at, te tel ly. Telos ea ata shelby exci he Stl oman Forearm you tel w eet he bash crn o cee the Sill Tene kl ison a Be be o cal of ie erent hel Wea ou execu a sl sit sty tte ¢ prop he caret shells 2d shell exc a lp Tecra ote shel ensues tht th serps on. tthe cunt shel Th sl oi aoc slo econ. The eid ‘Se eine a on athe elect ection cane ‘Th illoing eis mane a: ‘Chang FAP rhe He ig he fowing comand Inthe shone samp th int ne pci hte hel sei sb entered by ‘ng te Kem tl Osh. Inserting Comments “iwc ice comment cies ina sheet y peg Stents with be yb. ‘When tellers the symbol tips aloving he #symbel ina le ‘toa Tass Using Soa Sis In disexamle he hide comment The nent wll igs ella coat will dled. Ina shel sep ou can carmen so he ston a ‘esking of esl ee rf eee. Variables Creating Variables ‘ne bash shel. you do at sen dete aril expires canbe el sy poi ie by ipl sings vate. A arb canbe ted wit ve by levine itd ie ofthe ase oper) Sank The ta or cing 2 ail gien belo: sya vaniblemne>scilie> OSE ween Ete va tnt you asin oa wre oan demi, ah an ended se, outed keh ae win ern ede ates amie same" Leto? However, yu nel mt we te guion ma he vale dost ve any embeded Insel sigs, you cae cate abl ines or characte, Al he vrs a ‘te Lina operating tm rated chat sings Howeve Jo an peta rete peas on res ule Eee | coma ts wt learn Int above exam dr nt coin na rile. The vale cnn stunts, Teor, te arable conse arr” ta the mabe cy a ae =

You might also like