Ellhniko From DOS/Windows to Linux HOWTO Ypo Guido Gonzato, Metafrash: Nikos 8eodwroy, v1.3.2, 22 Febroyarioy 1999 Ayto to HOWTO einai afierwmeno se oloys toys (syntomws prwhn;) xrhstes toy DOS kai twn Windows poy apofasisan na strafoun sto Linux, ton eleu8ero klwno toy UNIX. O skopos toy keimenoy aytou einai na boh8hsei ton anagnwsth na metaferei tis gnwseis toy apo to DOS kai ta Windows sto periballon toy Linux, ka8ws epishs kai na prosferei idees gia thn antallagh arxeiwn kai phgwn metaju twn duo Leitoyrgikwn Systhmatwn. ______________________________________________________________________ Table of Contents 1. Eisagwgh 1.1 Einai to Linux katallhlo gia esas; 1.2 Einai. Peite moy perissotera. 1.2.1 Eisagwgika 8emata 1.2.2 Pou 8a breite boh8eia 1.3 Symbaseis 2. Gia toys anypomonoys 3. Gnwriste to bash 4. Arxeia kai Programmata 4.1 Arxeia: Eisagwgika 8emata 4.2 Symbolikoi desmoi 4.3 Dikaiwmata kai Idiokthsies 4.4 Arxeia: Metafrazontas entoles 4.4.1 Paradeigmata 4.5 Ektelesh Programmatwn: Polydiergasia kai Synedries (Sessions) 4.6 Ektelesh Programmatwn se Apomakrysmenoys Ypologistes. 5. Xrhsh Katalogwn 5.1 Katalogoi: Arxika Sxolia 5.2 Dikaiwmata Katalogwn 5.3 Katalogoi: Metafrash Entolwn 5.3.1 Paradeigmata 6. Disketes, sklhroi diskoi klp 6.1 Diaxeirish syskeywn me ton tropo toy DOS. 6.2 Diaxeirish syskeywn me ton tropo toy UNIX. 6.3 Antigrafa asfaleias (back up) 7. Kai ta Windows; 8. Ry8mizontas to susthma 8.1 Arxeia arxikopoihshs systhmatos 8.2 Arxeia arxikopoihshs programmatwn 9. 8emata Diktuwshs 10. Stoixeia Programmatismou 10.1 Senaria floiou: kata polu anwtera twn arxeiwn .bat 10.2 H pio C-mantikh glwssa 11. To ypoloipo 1% 11.1 H xrhsh twn tar kai gzip 11.2 Egkatastash efarmogwn 11.3 Xrhsimes symboyles 11.4 Pou 8a breite efarmoges 11.5 Kapoia pragmata poy de mporousate na kanete 11.6 Ejaskhsh toy UNIX ypo DOS/Windows 11.7 Synh8eis epektaseis kai sxetizomena programmata 11.8 Metatroph Arxeiwn 11.9 Eleu8eres Soyites grafeioy 12. Ayta, gia thn wra! 12.1 Copyright (koph toy right;) 12.2 Arnhsh ey8ynwn ______________________________________________________________________ 1. Eisagwgh 1.1. Einai to Linux katallhlo gia esas; Skefteste na allajete apo ton kosmo toy DOS (aytos o orismos kaluptei kai ta Windows) sto Linux; Kalh idea: to Linux einai texnikws anwtero toy DOS, twn Windows 9x kai akomh kai twn Windows NT. Prosoxh omws: isws na mhn einai xrhsimo gia esas. Aytes einai oi basikes diafores metaju twn DOS/Windows kai toy Linux: · Ta Windows trexoyn to Microsoft Office kai polla paixnidia. 8ewrountai eukola sthn egkatastash kai tis ry8miseis. Einai ejairetika asta8h. Leitoyrgoun ftwxa. Kollane syxna. · To Linux trexei to StarOffice, exei polu texniko logismiko kai ligotera paixnidia. Mporei na fanei duskolo sthn egkatastash kai tis ry8miseis. Einai sta8ero san braxos. Leitoyrgei ejairetika. Kollaei polu spania. Ejartatai apo esas na apofasisete ti xreiazeste. Epipleon, to Linux sas dinei dunamh, alla sas pairnei arketo xrono mexri na ma8ete pws na th xrhsimopoieite. Epishs, an xrhsimopoieite kyriws emporiko logismiko, h den exete orejh na ma8ete nees entoles kai diadikasies, kalutera cajte se alla leitoyrgika. Exete yp' och oti polla atoma poy apofasizoyn na asxolh8oun me to Linux ta paratoun, logw twn dyskoliwn sthn arxh. To Linux ginetai oloena aploustero sth xrhsh, omws mhn perimenete na ma8ete na to xrhsimopoieite teleia protou diabasete polu kai to exete xrhsimopoihsei gia toylaxiston merikous mhnes. To Linux de dinei amesa apotelesmata. Par' oles aytes tis proeidopoihseis omws eimai 100% sigoyro; oti me to Linux 8a breite ton Paradeiso gia ton ypologisth sas. Ep' eykairias, ypen8ymizw oti Linux + DOS/Win mporoun na synyparxoyn aneta ston idio ypologisth. Proupo8eseis gi' ayto to howto: Ypo8etw oti · gnwrizete tis basikes entoles kai diergasies toy DOS, · exete egkatesthmeno ston ypologisth sas to Linux, · pi8anws me to X Window System (gia syntomia X11), · to kelyfos (to antistoixo toy COMMAND.COM) einai to bash. Ektos an anafer8ei diaforetika, oles oi plhrofories poy parati8entai anaferontai sto palio kako DOS. Se kapoia shmeia yparxoyn plhrofories kai gia ta Windows here and there, exete omws yp' och oti ta Windows kai to Linux einai entelws diaforetika, se anti8esh me to DOS poy einai kati san enas ftwxos syggenhs toy UNIX. Epishs exete yp' och oti ayth h doyleia den einai enas plhrhs odhgos, oute kan odhgos gia arxarioys! H teleytaia ekdosh aytou toy keimenoy brisketai se diafores morfes sto . 1.2. Einai. Peite moy perissotera. Egkatasthsate to Linux kai tis efarmoges poy xreiazosastan ston ypologisth sas. Ftiajate enan logariasmo gia ton eayto sas (an oxi gracte adduser toonomasas twra! kai to Linux leitoyrgei. Dwsate to onoma xrhsth kai ton kwdiko sas, kai twra koitate thn o8onh skeptomenos «twra;». Mhn apogohteueste..... eiste sxedon etoimos na kanete o,ti kanate kai sta DOS/Win, kai polla akomh. An xrhsimopoiousate ta DOS/Win 8a kanate kati apo ta parakatw: · 8a trexate programmata kai 8a dhmioyrgousate, antigrafate, blepate, diagrafate, typwnate, metonomazate arxeia· · kataskeyazate, diagrafate katalogoys, 8a allazate metaju katalogwn kai 8a blepate ta periexomena toys· · 8a diamorfwnate disketes kai 8a antigrafate arxeia apo kai pros aytes· · 8a ry8mizate to susthma· · 8a «serfarate» sto Diadiktyo· · 8a grafate arxeia .BAT kai programmata sthn agaphmenh sas glwssa· · to ypoloipo 1% 8a sas endiaferei na ma8ete oti aytes oi leitoyrgies mporoun kai ginoyn kai sto Linux me tropo paromoio me ayton toy DOS. Sto DOS o mesos xrhsths xrhsimopoiei elaxistes apo tis 100 kai pleon dia8esimes entoles· to idio, mexri enos shmeioy, symbainei kai sto Linux. 1.2.1. Eisagwgika 8emata O kaluteros tropos na ma8ete kati neo einai na lerwsete ta xeria sas. Ston kosmo toy Linux en8arrunes8e na peiramatisteite kai na «paijete» me to leitoyrgiko, giati ektos ki an mpeite sto susthma (login) ws «root», den mporeite na kanete kanena kako. Kapoia shmeia: · kat' arxas, pws na kleisete to Linux me asfaleia: An deite mia o8onh keimenoy, pathste , perimenete na epanekkinhsei to susthma (reboot) kai meta kleiste ton ypologisth. An doyleuete ypo to X Window System, pathste prwta, kai meta . Pote mh sbhnete h epanekkineite ton ypologisth ap' ey8eias: ayto mporei na blacei to susthma arxeiwn (file system)· · anti8eta me to DOS kai Windows, to Linux exei ejarxhs mhxanismous asfaleias. Ta arxeia kai oi katalogoi exoyn dikaiwmata (permissions) sxetismena me ayta. Kata synepeia, kapoia arxeia - katalogoi De mporoun na prospelastoun apo ton aplo xrhsth· (blepe ``Dikaiwmata kai Idiokthsies''). To DOS kai ta Windows, anti8etws, 8a sas afhsoyn na sbhsete ola ta periexomena toy sklhrou sas diskoy` · yparxei enas eidikos xrhsths poy legetai «root»: einai o diaxeirisths toy systhmatos, me dikaiwmata zwhs kai 8anatoy epi toy ypologisth. An ergazeste sto diko sas ypologisth, 8a eiste kai root. Einai genika epikindyno: ka8ws to paramikro la8os mporei na blacei sobara h kai na katastrecei to susthma, opws akribws kai sta DOS/Win. Mh doyleuete ws root ektos ki an einai apolutws aparaithto· · pollh apo thn polyplokothta toy Linux ofeiletai sthn ychlh parametropoihsh toy. Sxedon ka8e idiothta kai ka8e programma poy trexei se Linux mporei na ry8mistei mesw enos h perissoterwn arxeiwn ry8misewn. H polyplokothta einai to timhma ths isxuos· · h anakateu8ynsh (redirection) kai to piping einai mia leitoyrgia toy DOS, polu shmantikh kai polu pio dynath sto Linux. Aples entoles mporoun na enw8oun, wste na epituxoyn pio poluploka erga. Proteinw na ma8ete polu kala pws na ta xrhsimopoieite. 1.2.2. Pou 8a breite boh8eia Yparxoyn para polloi tropoi na breite boh8eia gia to Linux. Oi shmantikoteroi einai: · na diabasete thn yparxoysa tekmhriwsh---kai to ennow! Par' oti ayto to HOWTO poy diabasete mporei na xrhsimeusei ws mia eisagwgh sto Linux, yparxoyn arketa biblia poy kalon einai na diabasete: to «Linux Installation and Getting Started» toy Matt Welsh ( ), to «Linux User Guide» toy Larry Greenfield ( ), kai to FAQ toy Linux ( ). Na niw8ete ligaki enoxos ews otoy diabasete toylaxiston ena apo ayta! · h tekmhriwsh twn hdh egkatesthmenwn paketwn syxna brisketai se ypokatalogoys toy /usr/doc/· · gia na parete boh8eia sxetikws me tis «eswterikes entoles» toy kelufoys, gracte help h, kalutera, man bash h info bash· · gia boh8eia se kapoia entolh, gracte man entolh poy epikaleitai th selida egxeiridioy (man page) ths entolh. Enallaktika, gracte info entolh poy epikaleitai, ean yparxei, th selida plhroforiwn (info page) ths entolh· prokeitai gia ena susthma tekmhriwshs se yperkeimeno (hypertext) isws oxi filiko gia xrhsh sthn arxh. Telos, mporeite na xrhsimopoihsete ta apropos entolh h whatis entolh. Se ka8e periptwsh, pathste `q' gia ejodo· · telos, sto Diadiktyo (Internet): to kalutero meros gia boh8eia einai oi Omades Syzhthsewn (Usenet), opws h . Parakalw mh moy steilete hl. epistolh gia boh8eia, ka8ws einai arketa apasxolhmenos. · (S.t.M. kante mia boltoula ki apo to «diko mas» www.linux.gr ...) 1.3. Symbaseis Sto paron eggrafo polla paradeigmata 8a einai sthn ejhs morfh: h <...> einai mia aparaithth parametros, enw h [...] proairetikh. Paradeigma: $ tar -tf [> redir_file] To file.tar prepei na anaferetai, omws h anakateu8ynsh (redirection) sto redir_file einai proairetikh. «RMP» shmainei «please Read the Man Pages for further information» (= parakalw diabaste tis selides egxeiridioy gia peraiterw plhrofories). Epanalambanw oti einai ejairetika shmantiko na diabazei kaneis thn tekmhriwsh. To «DOSWin» shmainei «DOS/Windows». Otan to prompt mias entolhs einai to #, h entolh ayth mporei na klh8ei monon apo ton root. 2. Gia toys anypomonoys Gia ena grhgoro jekinhma, rijte mia matia ston parakatw pinaka: DOS Linux Shmeiwseis ------------------------------------------------------------------------------ ATTRIB (+-)attr file chmod file entelws diaforetiko BACKUP tar -Mcvf device dir/ to idio CD dirname\ cd dirname/ sxedon h idia syntaksh COPY file1 file2 cp file1 file2 to idio DEL file rm file prosoxh - den yparxei undelete DELTREE dirname rm -R dirname/ to idio DIR ls oxi akribws h idia syntaksh DIR file /S find . -name file entelws diaforetiko EDIT file vi file ypopsiazomai oti de 8a sas aresei jstar file moiazei me to edit toy dos EDLIN file ed file ksexaste to FORMAT fdformat, mount, umount arketa diaforetikh syntaksh HELP command man command, idia logikh info command MD dirname mkdir dirname/ sxedon h idia syntaksh MORE < file less file safws anwtero MOVE file1 file2 mv file1 file2 to idio NUL /dev/null to idio PRINT file lpr file to idio PRN /dev/lp0, /dev/lp1 to idio RD dirname rmdir dirname/ sxedon h idia syntaksh REN file1 file2 mv file1 file2 oxi gia pollapla arxeia RESTORE tar -Mxpvf device diaforetikh syntaksh TYPE file less file poly kalytero WIN startx apexei parassagkes! An 8elete kati parapanw apo enan pinaka me entoles, deite thn parakatw enothta. 3. Gnwriste to bash Exw kala nea: sto Linux plhktrologeite polu ligotera sth grammh entolwn, afou to kelyfos bash plhktrologei gia sas opote einai dynaton, kai exei arketes omorfes leitoyrgies dior8wsewn. Kat' arxas, to epanw belos anakalei tis prohgoumenes grammes entolwn· kai oxi mono. Patwntas symplhrwnontai ta onomata arxeiwn kai katalogwn. Gia paradeigma, to na gracei kaneis $ ls /uTABloTABbTAB einai san na grafei $ ls /usr/local/bin An yphrje mplejimo kata th grafh toy $ ls /uTABloTABiTAB tote to bash stamata, dioti den jerei an ennoeite /usr/local/info h /usr/local/include. Dwste perissoteroys xarakthres kai janapathste Alloi xrhsimoi syndyasmoi einai o poy sbhnei mia lejh sta aristera , enw o sbhnei mia lejh sta dejia· o metakinei to dromea kata mia lejh sta dejia kai o sta aristera· o metakinei sthn arxh ths grammhs kai o sto telos ths. O syndyasmos einai isodunamos me ton . Arketa gia twra. Molis synh8isete aytes tis syntomeuseis, 8a briskete th grammh entolwn toy DOS polu enoxlhtikh... 4. Arxeia kai Programmata 4.1. Arxeia: Eisagwgika 8emata H domh twn arxeiwn kai katalogwn toy Linux einai arketa paromoia me aythn toy DOSWin. Ta arxeia exoyn onomata poy ypokeintai se orismenoys kanones, fylassontai se katalogoys, kapoia einai ektelesima kai metaju twn ektelesimwn kapoia exoyn diakoptes (switches) ws entoles. Epipleon, mporeite na xrhsimopoieite xarakthres mpalantes (wildcard), anakateu8ynshs (redirection) kai piping. Yparxoyn mono kapoies mikres diafores: · sto DOS, ta onomata twn arxeiwn einai sth legomenh «morfh 8.3»· p.x. NOTENOUG.TXT. Sto Linux kanoyme kalutera pragmata. An egkatasthsate to Linux xrhsimopoiwntas ena susthma arxeiwn (file system) opws to ext2 h to umsdos, mporeite na xrhsimopoieite makrutera onomata (ews 255 xarakthres), kai me perissoteres ths mias teleies: paradeigmatos xarin, Ayto_einai.ena.POLY_makry.onomaarxeioy. Shmeiwste oti xrhsimopoihsa toso kefalaioys oso kai mikrous xarakthres: Allwste... · oi pezoi kai oi kefalaioi xarakthres sta onomata arxeiwn einai diaforetikoi. Etsi, ta FILENAME.tar.gz kai filename.tar.gz einai duo diaforetika arxeia. To ls einai mia entolh, to LS einai ena la8os· · oi xrhstes twn Windows as prosexoyn otan xrhsimopoioun megala onomata arxeiwn sto Linux. An to onoma enos arxeioy periexei kena (den proteinetai, alla mporei na ginei) tote prepei na perikleisete to onoma toy arxeioy se dipla latinika eisagwgika ka8e fora poy anafereste s' ayto. Paradeigma: $ # h parakatw entolh ftiaxnei enan katalogo poy legetai "My old files" $ mkdir "My old files" $ ls My old files bin tmp Epishs, kapoioi xarakthres kalo einai na mh xrhsimopoiountai. P.x.: !*$&#· · den yparxoyn desmeytikes epektaseis opws .COM kai .EXE gia ta programmata h .BAT gia ta arxeia batch. Ta ektelesima arxeia shmeiwnontai me enan asterisko *' sto telos toy onomatos toys, otan ekteleite thn entolh ls -F . Gia paradeigma: $ ls -F I_am_a_dir/ cindy.jpg cjpg* letter_to_Joe my_1st_script* old~ Ta arxeia cjpg* kai my_1st_script* einai ektelesima, dhladh «program- mata» . Sto DOS, ta arxeia backup lhgoyn se .BAK, enw sto Linux lhgoyn me mia perispwmenh `~'. Epishs, ena arxeio to onoma toy opoioy jekina me teleia 8ewreitai kryfo. Paradeigma: to arxeio .I.am.a.hidden.file de 8a fanei meta thn entolh ls· · Oi diakoptes (switches) sta programmata toy DOS dinontai sth morfh /switch, enw sto Linux dinontai me -switch h --switch. Paradeigma: to dir /s 8a ginei ls -R. Shmeiwste oti polla programmata toy DOS, opws to PKZIP h to ARJ, xrhsimopoioun diakoptes tupoy UNIX. Mporeite twra na metafer8eite sthn enothta ``Metafrash entolwn apo to DOS sto Linux'', sth 8esh sas omws 8a diabaza ki allo. 4.2. Symbolikoi desmoi Sto UNIX yparxei ena eidos arxeiwn poy den yparxei sto DOS: o symbolikos desmos (symbolic link). Ayto mporei na 8ewrh8ei ws deikths pros ena arxeio h enan katalogo, kai mporei na xrhsimopoieitai anti gia to deiknyomeno· einai paromoio me tis syntomeuseis twn Windows. Paradeigmata symbolikwn desmwn einai to /usr/X11, poy deixnei sto /usr/X11R6· to /dev/modem, poy deixnei eite sto /dev/ttyS0 h sto /dev/ttyS1. Gia na ftiajete enan symboliko desmo: $ ln -s Paradeigma: $ ln -s /usr/doc/g77/DOC g77manual.txt Twra mporeite na anafereste sto g77manual.txt anti gia to /usr/doc/g77/DOC. Oi desmoi fainontai etsi sthn ejodo toy ls : $ ls -F g77manual.txt@ $ ls -l (diafora_pragmata...) g77manual.txt -> /usr/doc/g77/DOC 4.3. Dikaiwmata kai Idiokthsies Ta arxeia kai oi katalogoi sto DOS exoyn ta akoloy8a xarakthristika (attributes): A (archive, arxeia), H (hidden, kryfa), R (read-only, mono gia anagnwsh), and S (system, systhmatos). Monon ta H kai ta R exoyn nohma sto Linux: ta kryfa arxeia jekinoun me mia teleia, oso gia to attribute R, diabaste ki allo. Sto UNIX ena arxeio exei «dikaiwmata» (permissions) kai enan idiokthth (owner), o opoios me th seira toy anhkei se mia «omada» (group). Deite to paradeigma: $ ls -l /bin/ls -rwxr-xr-x 1 root bin 27281 Aug 15 1995 /bin/ls* To prwto pedio periexei ta dikaiwmata toy arxeioy /bin/ls, poy anhkei ston root, omada bin. Afhnontas tis ypoloipes plhrofories poy dinei h entolh, stekomaste sth shmasia toy -rwxr-xr-x apo aristera pros ta dejia: - einai to eidos toy arxeioy (- = kanoniko arxeio, d = katalogos, l = desmos, klp)` rwx einai ta dikaiwmata toy idiokthth toy arxeioy (owner) kai einai(read=anagnwsh, write=eggrafh, execute=ektelesh)· r-x einai ta dikaiwmata ths omadas (group) toy idiokthth (owner) toy arxeioy kai einai (read=anagnwsh, execute=ektelesh)· (De 8a kalucw thn ennoia ths omadas, 8ewrw oti mporeite na kanete kai xwris aythn, ef' oson eiste arxarioi ;-) kai r-x einai ta dikaiwmata gia oloys toys alloys xrhstes (read=anagnwsh, execute=ektelesh). O katalogos /bin exei epishs dikaiwmata: deite sthn enothta ``Directories Permissions'' gia peraiterw plhrofories. Gi' ayto den mporeite na diagracete to arxeio /bin/ls para mono an eiste root: den exete to dikaiwma (permission) na to kanete. Gia na allajete ta dikaiwmata enos arxeioy, h entolh einai: $ chmod opoy who einai u (user=xrhsths, einai o idiokthths), g (group=omada), o (other=alloi), X einai eite + h -, perm einai r (read=anagnwsh), w (write=eggrafh), or x (execute=ektelesh). Kapoia paradeigmata ths xrhshs ths chmod einai ta akoloy8a: $ chmod +x file ayto 8etei to dikaiwma ekteleshs gia to arxeio. $ chmod go-rw file ayto afairei ta dikaiwmata anagnwshs kai eggrafhs gia oloys, plhn toy idiokthth. $ chmod ugo+rwx file ayto dinei se oloys (xrhsth, omada, alloys) dikaiwmata anagnwshs, eggrafhs kai ekteleshs. # chmod +s file ayto ftiaxnei ena arxeio «setuid» h «suid» --- ena arxeio poy mporoun oloi na ektelesoyn, me ta dikaiwmata toy idiokthth toy. 8a synanthsete arketa suid arxeia toy root· ayta einai synh8ws shmantika arxeia toy systhmatos, opws o X server. Enas pio suntomos tropos gia na anafer8ei kaneis sta dikaiwmata einai me ari8mhtika chfia: To rwxr-xr-x mporei na ekfrastei ws 755 (ka8e gramma antistoixei se enan ari8mo: to --- einai 0, to --x einai 1, to -w- einai 2, to -wx einai 3...). Deixnei duskolo, alla me ligh ejaskhsh 8a katalabete thn ennoia. O root, ontas o «yperxrhsths» mporei na allajei ta dikaiwmata twn arxeiwn olwn twn xrhstwn. RMP. 4.4. Arxeia: Metafrazontas entoles Aristera briskontai oi entoles toy DOS· dejia oi antistoixes gia to Linux. ATTRIB: chmod COPY: cp DEL: rm MOVE: mv REN: mv TYPE: more, less, cat Telestes anakateu8ynshs (redirection) kai plumbing: < > >> | Xarakthres Mpalanter: * ? nul: /dev/null prn, lpt1: /dev/lp0 h /dev/lp1; lpr 4.4.1. Paradeigmata DOS Linux --------------------------------------------------------------------- C:\NIKOS>ATTRIB +R FILE.TXT $ chmod 400 file.txt C:\NIKOS>COPY JOE.TXT JOE.DOC $ cp joe.txt joe.doc C:\NIKOS>COPY *.* TOTAL $ cat * > total C:\NIKOS>COPY FRACTALS.DOC PRN $ lpr fractals.doc C:\NIKOS>DEL TEMP $ rm temp C:\NIKOS>DEL *.BAK $ rm *~ C:\NIKOS>MOVE PAPER.TXT TMP\ $ mv paper.txt tmp/ C:\NIKOS>REN PAPER.TXT PAPER.ASC $ mv paper.txt paper.asc C:\NIKOS>PRINT LETTER.TXT $ lpr letter.txt C:\NIKOS>TYPE LETTER.TXT $ more letter.txt C:\NIKOS>TYPE LETTER.TXT $ less letter.txt C:\NIKOS>TYPE LETTER.TXT > NUL $ cat letter.txt > /dev/null n/a $ more *.txt *.asc n/a $ cat section*.txt | less Shmeiwseis: · To * einai ejypnotero sto Linux: to * shmainei ola ta arxeia ektos apo ta kryfa· to .* shmainei ola ta kryfa arxeia (kai epishs ton trexonta katalogo `.' kai ton prohgoumeno `..': prosoxh!)· to *.* shmainei mono ta arxeia poy exoyn ena `.' sth mesh me mia teleia· to p*r shmainei «peter» kai «piper»· to *c* shmainei «picked» kai «peck»· · otan xrhsimopoieite more, piezete gia na diabasete to arxeio kai «q» gia ejodo. To less exei perissoteres leitoyrgies kai epitrepei th xrhsh twn belwn· · den yparxei UNDELETE, gi' ayto skefteite to kala protou sbhsete otidhpote· · en anti8esei pros to < > >>toy DOS, to Linux exei 2> gia na anakatey8unei mhnumata la8oys (stderr)· epipleon, to 2>&1 anakatey8unei apo to stderr sto stdout, enw to 1>&2 anakatey8unei apo to stdout sto stderr· · To Linux exei ena akomh wildcard: to []. Xrhsh: to [abc]* shmainei ola ta arxeia poy jekinoun me a, b, c· to *[I-N1-3] shmainei ta arxeia poy teleiwnoyn se I, J, K, L, M, N, 1, 2, 3· · to lpr typwnei mia selida sto paraskhnio. Gia na elegjete thn katastash ths allhloyxias ektupwshs (print queue) xrhsimopoieiste to lpq· gia na afairesete ena arxeio apo thn allhloyxia ektupwshs xrhsimopoieiste lprm· · den yparxei entolh paromoia me thn RENAME toy DOS· dhladh, to mv *.xxx *.yyy de 8a doylecei. Mia entolh paromoia me thn REN einai dia8esimh sto · · xrhsimopoieiste cp -i kai mv -i gia na eidopoih8eite otan ena arxeio prokeitai na epikalyf8ei. 4.5. Ektelesh Programmatwn: Polydiergasia kai Synedries (Sessions) Gia na trejete ena programma plhktrologeiste to onoma toy opws 8a kanate kai sto DOS. An o katalogos (Enothta ``Xrhsh Katalogwn'') poy einai egkatesthmeno to programma periexetai sto the PATH (Section ``Arxeia Arxikopoihshs (Initialisation) Systhmatos''), to programma 8a jekinhsei. Ejairesh: En anti8esei pros to DOS, sto Linux ena programma poy periexetai ston trexonta katalogo de 8a trejei, ektos an o katalogos periexetai sto PATH. Lush: an to programma einai prog plhktrologeiste ./prog. H synh8hs grammh ergaleiwn einai kapws etsi: $ command [-s1 [-s2] ... [-sn]] [par1 [par2] ... [parn]] [< input] [> output] opoy -s1, ..., -sn einai oi diakoptes ths entolhs, par1, ..., parn einai oi parametroi toy programmatos. Mporeite na xrhsimopoihsete perissoteres ths mias entoles sthn grammh entolwn: $ command1 ; command2 ; ... ; commandn Ayta exw na pw gia to trejimo programmatwn, einai omws polu aplo na poume kati perissotero. Enas apo toys basikous logoys gia th xrhsh toy Linux einai to gegonos oti prokeitai gia ena polydiergasiako L.S., dhladh oti mporei na trexei perissotera toy enos programmata (ef' ejhs diadikasies (processes) taytoxronws). Mporeite na jekinate diadikasies sto peri8wrio (background) synexizontas na ergazeste opws prin. Epipleon, sto Linux mporeite na exete polles synedries: einai san na exete pollous ypologistes na leitoyrgoun taytoxronws! · Gia na allajete stis synedries 1..6 twn eikonikwn konsolwn (virtual consoles), pieste ... · Gia na jekinhsete mia nea synedria sthn idia eikonikh konsola xwris na afhsete thn trexoysa, pathste su - . Paradeigma: su - root. Ayto einai xrhsimo, gia paradeigma, an 8elete na ektelesete mia ergasia poy mporei na kanei mono o root. · Gia na termatisete mia synedria, plhktrologeiste exit. An yparxoyn stamathmenes ergasies (stopped jobs) (blepe parakatw), 8a eidopoih8eite. · Gia na jekinhsete mia diadikasia sto peri8wrio, pros8este to sumbolo '&' sto telos ths grammhs entolwn: $ programma [-diakoptes] [parametroi] [< eisodos] [> eksodos] & [1] 123 to kelyfos anagnwrizei th diadikasia me enan ari8mo ergasias (p.x. [1]· bl. parakatw), kai me enan PID (Process Identification Number, Ari8mo Anagnwrisews Diadikasias · sto paradeigma mas 123). · Gia na deite poses diadikasies yparxoyn, plhktrologeiste ps ax. Ayto 8a dwsei ws apotelesma enan katalogo twn trexontwn diadikasiwn th stigmh ayth. · Gia na skotwsete (termatisete) mia diadikasia, plhktrologeiste kill . Kapoies fores isws 8elhsete na skotwsete mia diadikasia otan den jerete pws na thn termatisete me ton fysiologiko tropo... Mporeite na skotwsete tis diadikasies allwn xrhstwn monon an eiste o root. Kapoies fores, mia diadikasia skotwnetai monon me kill -SIGKILL . Epipros8etws, to kelyfos sas epitrepei na stamatate h na diakoptete proswrina mia diadikasia, na th steilete sto paraskhnio kai na ferete mia diadikasia apo to paraskhnio. Otan anaferomaste se ayta ta 8emata 8a kaloume tis diadikasies «ergasies» (jobs). · Gia na deite poses ergasies yparxoyn plhktrologeiste jobs. Edw, oi ergasies anagnwrizontai apo ton ari8mo ergasias toys kai oxi to PID. · Gia na stamathsete mia ergasia poy trexei sto foreground, plhktrologeiste (de 8a doylecei panta). · Gia na diakocete mia ergasia poy trexei sto foreground, plhktrologeiste (omoiws). · Gia na steilete mia diakekommenh ergasia sto paraskhnio, plhktrologeiste bg <%job> (metatrepetai se ergasia). · Gia na ferete mia ergasia sto foreground, plhktrologeiste fg <%job>. Gia na ferete sto foreground thn teleytaia ergasia poy steilate sto paraskhnio, dwste apla fg. · Gia na skotwsete mia ergasia, plhktrologeiste kill <%job> opoy mporei na einai 1, 2, 3,... Xrhsei aytwn twn entolwn mporeite na diamorfwsete ena disko, na sympiesete ena plh8os arxeiwn, na metaglwttisete ena programma kai na aposympiesete ena sympiesmeno arxeio taytoxronws, exontas akomh to prompt sth dia8esh sas! Dokimaste na to kanete ayto kai sta Windows kai deite thn diafora apodosews (ef' oson den kollhsoyn....). 4.6. Ektelesh Programmatwn se Apomakrysmenoys Ypologistes. Gia na trejete ena programma se enan apomakrysmeno ypologisth onomati remote.machine.edu: $ telnet remote.machine.edu Afou kanete log in, jekinhste to agaphmeno sas programma. Ennoeite pws 8a prepei na exete logariasmo kelufoys (shell account) ston apomakrysmeno ypologisth. An exete X11, mporeite na trejete kai efarmoges X apo apomakrysmenoys ypologistes, kanontas tis na fainontai sthn o8onh toy proswpikou sas ypologisth. Estw remote.machine.edu to apomakrysmeno susthma kai local.linux.box to Linuxokoyto sas. Gia na trejete apo to local.linux.box mia efarmogh X eyriskomenh sto remote.machine.edu, kante ta parakatw: · anoijte to X11, jekinhste ena xterm h kapoion allon symbato ejomoiwth termatikou (terminal emulator) kai plhktrologeiste: $ xhost +remote.machine.edu $ telnet remote.machine.edu · afou kanete log in, plhktrologeiste: remote:$ DISPLAY=local.linux.box:0.0 remote:$ progname & (anti gia DISPLAY..., isws xreiastei na gracete: setenv DISPLAY local.linux.box:0.0. Ejartatai apo to apomakrysmeno kelyfos.) Et voila! To progname 8a jekinhsei ston remote.machine.edu kai 8a fainetai ston ypologisth sas. Kalutera na mhn to xrhsimopoihsete omws me sundesh mesw modem, giati 8a einai ejairetika argo kai ara oxi idiaitera xrhsimo.. Epipleon, einai mia ajesth kai anasfalhs me8odos: kalutera diabaste to «Remote X Apps mini-HOWTO» sth dieu8ynsh . 5. Xrhsh Katalogwn 5.1. Katalogoi: Arxika Sxolia Eidame tis diafores metaju twn arxeiwn sto DOSWin kai sto Linux. Oson afora toys katalogoys, sto DOSWin o rizikos katalogos einai \ kai sto Linux einai /. Omoiws, oi fwliasmenoi katalogoi xwrizontai me \ sto DOSWin, enw me / sto Linux. Paradeigmata diadromwn arxeiwn: DOS: C:\PAPERS\GEOLOGY\MID_EOC.TEX Linux: /home/nikos/papers/geology/middle_eocene.tex Ws synh8ws, .. einai o patrikos katalogos (parent directory) kai . einai o trexwn katalogos (current) directory. Na 8ymaste oti to susthma den epitrepei na trejete tis cd, rd, kai md opoy 8elete. Ka8e xrhsths diathrei ta pragmata toy se enan katalogo poy onomazetai «oikeios» (home), poy didetai apo to diaxeiristh toy systhmatos· paradeigmatos xarin, ston ypologisth moy o oikeios katalogos moy einai o /home/nikos. 5.2. Dikaiwmata Katalogwn Kai oi katalogoi exoyn dikaiwmata. Isxuoyn osa eidame sthn enothta ``Dikaiwmata kai idiokthsies'' , dhladh ta xrhsths (user), omada (group) kai alloi (other). Sthn periptwsh twn katalogwn, to rx shmainei oti mporeite na allajete ston katalogo kai w oti mporeite na diagracete ena arxeio toy katalogoy (sumfwna me ta dikaiwmata toy arxeioy fysika) h kai ton idio ton katalogo. Gia paradeigma, gia na krathsw toys alloys xrhstes makria apo to arxeio /home/nikos/text: $ chmod o-rwx /home/nikos/text 5.3. Katalogoi: Metafrash Entolwn DIR: ls, find, du CD: cd, pwd MD: mkdir RD: rmdir DELTREE: rm -rf MOVE: mv 5.3.1. Paradeigmata DOS Linux --------------------------------------------------------------------- C:\NIKOS>DIR $ ls C:\NIKOS>DIR FILE.TXT $ ls file.txt C:\NIKOS>DIR *.H *.C $ ls *.h *.c C:\NIKOS>DIR/P $ ls | more C:\NIKOS>DIR/A $ ls -l C:\NIKOS>DIR *.TMP /S $ find / -name "*.tmp" C:\NIKOS>CD $ pwd n/a - vlepe simeiwsi $ cd omoiws $ cd ~ omoiws $ cd ~/temp C:\NIKOS>CD \OTHER $ cd /other C:\NIKOS>CD ..\TEMP\TRASH $ cd ../temp/trash C:\NIKOS>MD NEWPROGS $ mkdir newprogs C:\NIKOS>MOVE PROG .. $ mv prog .. C:\NIKOS>MD \PROGS\TURBO $ mkdir /progs/turbo C:\NIKOS>DELTREE TEMP\TRASH $ rm -rf temp/trash C:\NIKOS>RD NEWPROGS $ rmdir newprogs C:\NIKOS>RD \PROGS\TURBO $ rmdir /progs/turbo Shmeiwseis: · gia th xrhsh ths rmdir, o pros diagrafh katalogos prepei na einai kenos. Gia na diagracete enan katalogo mazi me ola toy ta periexomena xrhsimopoieiste thn rm -rf me dikh sas ey8unh· · o xarakthras «~» einai syntomeysh gia to onoma toy oikeioy katalogoy sas. Oi entoles cd h cd ~ 8a sas metaferoyn ston oikeio katalogo apo opoy ki an eiste· h entolh cd ~/tmp 8a sas metaferei sto /home/your_home/tmp· · h cd - «anairei» thn teleytaia cd. 6. Disketes, sklhroi diskoi klp Yparxoyn duo me8odoi na diaxeiristei kaneis tis syskeyes: o tropos toy DOS kai o tropos toy UNIX Eeeeeseis apofasizete! 6.1. Diaxeirish syskeywn me ton tropo toy DOS. Oi perissoteres dianomes toy Linux periexoyn thn soyita Mtools suite, ena sunolo entelws antistoixwn entolwn pros aytes toy DOS, me th diafora oti jekinoun me ena «m»: p.x., mformat, mdir, mdel, mmd, klp. Mporoun epishs na diaxeiristoun megala onomata arxeiwn, alla oxi dikaiwmata. An ry8misete ta Mtools tropopoiwntas to arxeio /etc/mtools.conf (ena deigma perilambanetai sth dianomh) 8a mporeite na exete prosbash sth diamerish DOS/Win, sto CD--ROM, kai to Zip drive. Omws h entolh mformat de 8a leitoyrghsei gia na diamorfwsete mia freskoagorasmenh disketa. Ws root, 8a prepei na trejete prokatabolika thn entolh: fdformat /dev/fd0H1440. Den mporeite na xrhsimopoihsete arxeia se mia disketa me mia entolh toy tupoy less a:file.txt! Ayto einai to meionekthma toy xeirismou diskwn me ton tropo toy DOS. 6.2. Diaxeirish syskeywn me ton tropo toy UNIX. To UNIX exei diaforetiko tropo na xeirizetai tis syskeyes. Den yparxoyn jexwristoi tomoi opws A: kai C: · enas diskos eite einai disketa h otidhpote ginetai tmhma enos topikou systhmatos arxeiwn mesw mias diadikasias poy legetai «prosarthsh» (mounting). Otan teleiwsete me th syskeyh, prepei na thn «apoprosarthsete» protou thn ejagete. H fysikh diamorfwsh enos diskoy kai h dhmioyrgia enos systhmatos arxeiwn ep' aytou einai duo diaforetikes diadikasies. H entolh FORMAT A: sto DOS kanei kai ta duo, sto Linux omws yparxoyn diaforetikes entoles. Gia na diamorfwsete mia disketa deite anwterw· gia na dhmioyrghsete ena susthma arxeiwn: # mkfs -t ext2 -c /dev/fd0H1440 Mporeite na xrhsimopoihsete dos, vfat (proteinomeno) h alla eidh anti gia to ext2. Molis h disketa etoimastei, prosarthste thn me thn entolh: # mount -t ext2 /dev/fd0 /mnt ka8orizontas to swsto susthma arxeiwn, an den xrhsimopoieite ext2. Twra mporeite na anafereste sta arxeia ths disketas xrhsimopoiwntas /mnt anti gia A: kai B:. Paradeigmata: DOS Linux --------------------------------------------------------------------- C:\NIKOS>DIR A: $ ls /mnt C:\NIKOS>COPY A:*.* $ cp /mnt/* . C:\NIKOS>COPY *.ZIP A: $ cp *.zip /mnt C:\NIKOS>EDIT A:FILE.TXT $ jstar /mnt/file.txt C:\NIKOS>A: $ cd /mnt A:> _ /mnt/$ _ Otan teleiwsete prin ejagete th disketa prepei na thn apoprosarthsete me thn entolh # umount /mnt Profanws, xreiazetai na efarmosete tis fdformat kai mkfs mono se adiamorfwtes disketes kai oxi se hdh xrhsimopoioumenes. An 8elete na xrhsimopoihsete ton odhgo (drive) B:, antikatasthste ta fd0H1440 kai fd0 me fd1H1440 kai fd1 antistoixws sta prohgoumena paradeigmata. Epishs einai profanes pws osa eipame gia tis disketes isxuoyn kai gia alles syskeyes· paradeigmatos xarin, mporeite na prosarthsete enan sklhro disko h enan odhgo CD--ROM. Gia na prosarthsete ena CD--ROM: # mount -t iso9660 /dev/cdrom /mnt Aytos einai o «epishmos» tropos gia na prosarthsete toys diskoys sas. Ka8ws omws einai arketa ekneyristiko na prepei na einai kaneis root gia na prosarthsei mia disketa h ena CD--ROM, yparxei kai h plagia odos: · Ws root, kante ta ejhs: # mkdir /mnt/floppy ; mkdir /mnt/cdrom # chmod 777 /mnt/floppy /mnt/cd* # # sigoureuteite oti h syskeyh CD-ROM einai swsth # chmod 666 /dev/hdb ; chmod 666 /dev/fd* · kai pros8este sto /etc/fstab tis ejhs grammes: /dev/cdrom /mnt/cdrom iso9660 ro,user,noauto 0 0 /dev/fd0 /mnt/floppy vfat user,noauto 0 0 Twra, gia na prosarthsete mia disketa DOS kai ena CD--ROM: $ mount /mnt/floppy $ mount /mnt/cdrom Ta /mnt/floppy kai /mnt/cdrom einai pleon prosbasima apo oloys toys xrhstes. Exete yp' och oti epitrepontas se oloys toys xrhstes na prosarmozoyn disketes kat' ayton ton tropo afhnete mia xasmatwdh trupa asfaleias, ef' oson sas endiaferei. Duo xrhsimes entoles einai h df, poy dinei plhrofories gia to prosarthmeno susthma arxeiwn, kai h du dirname poy anaferei to xwro sto disko poy katalambanei o katalogos dirname. 6.3. Antigrafa asfaleias (back up) Yparxoyn diafora paketa poy mporoun na sas boh8hsoyn, to elaxisto omws poy mporeite na kanete gia na dhmioyrghsete antigrafa asfaleias (backup) se polles disketes einai (ws root): # tar -M -cvf /dev/fd0H1440 dir_to_backup/ Sigoyreyteite oti exete mia diamorfwmenh disketa ston tomo kai arketes akomh etoimes. Gia na epanaferete (restore) ta pragmata sas, eisagete thn prwth disketa ston tomo kai plhktrologeiste: # tar -M -xpvf /dev/fd0H1440 7. Kai ta Windows; To «antistoixo» twn Windows einai to grafiko susthma X Window System. Anti8eta me ta Windows kai to Mac, to X11 den kataskeyasthke gia eykolia sthn xrhsh h gia omorfia, alla gia na prosferei grafikes dynatothtes se sta8mous ergasias UNIX. Aytes einai oi basikes diafores: · enw ta Windows deixnoyn to idio pantou, to X11 den einai etsi· einai polu pio parametropoihsimo. H genikh och dinetai apo ena systatiko poy legetai «diaxeirisths para8urwn» (window manager, w.m.), gia thn epilogh toy opoioy exete ena eyru pedio: fvwm, basikos alla kalos kai oikonomikos sth mnhmh, fvwm2-95, Afterstep, WindowMaker, Enlightenment, kai polloi akomh. O w.m. energopoieitai synh8ws apo to .xinitrc· · o w.m. sas mporei na ry8mistei wste ka8e para8yro na leitoyrgei opws sta -xmm- Windows: patate epanw toy kai erxetai sto prokeimeno (foreground). Mia allh dynatothta einai na erxetai sto prokeimeno ka8e fora poy to pontiki kineitai panw toy («focus»). Akomh, h topo8ethsh twn para8urwn sthn o8onh mporei na einai aytomath h na yparxei allhlepidrash (interactive): an ena periergo plaisio emfanistei anti gia to programma sas, pathste me to aristero plhktro toy pontikou sto shmeio poy to 8elete na emfanistei· · oi perissoteres epiloges mporoun na ry8mistoun dior8wnontas ena h perissotera arxeia ry8misewn. Diabaste thn tekmhriwsh toy w.m. sas: to arxeio ry8misewn einai .fvwmrc, .fvwm2rc95, .steprc, ktl. Ena deigma arxeioy ry8misewn brisketai synh8ws sto /etc/X11/window- manager-name/system.window-manager-name· · oi efarmoges toy X11 einai grammenes me th xrhsh eidikwn biblio8hkwn («widget sets»)· ka8ws yparxoyn diafores, oi efarmoges deixnoyn diaforetikes. Oi pio basikes einai aytes poy xrhsimopoioun ta Athena widgets (och duo diastasewn, 2--D look· xdvi, xman, xcalc)· alles xrhsimopoioun to Motif (netscape), alles ta Tcl/Tk, XForms, Qt, Gtk, kai alla. Sxedon oles aytes oi biblio8hkes prosferoyn peripoy thn idia och kai ais8hsh me ta Windows· · h ais8hsh, dystyxws, mporei na einai asynarthth. Paradeigmatos xarin, an epilejete mia grammh keimenoy xrhsimopoiwntas to pontiki kai pathsete , 8a perimenate na ejafanistei, swsta; Ayto de symbainei me tis efarmoges poy einai basismenes sto Athena, leitoyrgei omws me alla widget sets· · o tropos me ton opoio leitoyrgoun oi mpares kylisews kai ayjomeiwsews ejartatai apo ton w.m. kai to widget set. Symboylh: an deite oti oi mpares kylisews den symperiferontai opws perimenate, dokimaste na tis kinhsete xrhsimopoiwntas ta duo plhktra toy pontikiou mazi h to mesaio· · oi efarmoges den exoyn ena eikonidio ej orismou, alla mporoun na exoyn polla. Oi perissoteroi w.m. exoyn ena menou poy kaleite patwntas me to pontiki sthn epifaneia ergasias («riziko para8yro»)· profanws, to menou ayto mporei na ry8mistei. Gia na allajete thn emfanish toy rizikou para8uroy, xrhsimopoieiste to xsetroot h to xloadimage· · to proxeiro mporei na periexei mono keimeno, kai symperiferetai parajena. Apaj epilejate kapoio keimeno, ayto antigrafetai sto proxeiro· metakinh8eite kapoy allou kai pathste to mesaio plhktro gia na to epikollhsete (paste). Mia efarmogh poy xrhsimeuei gia pollapla buffers (pedia mnhmhs) einai to xclipboard· · yparxei epishs h dynatothta toy drag and drop, monon ef' oson h efarmogh kai o w.m. to yposthrizoyn. Gia oikonomia mnhmhs, synistatai na xrhsimopoieite efarmoges poy xrhsimopoioun tis idies biblio8hkes. Sthn prajh, bebaia, ayto einai duskolo na efarmostei. Yparxoyn kapoia egxeirhmata me skopo na kanoyn to X11 na deixnei kai na symperiferetai toso symbata oso kai ta Windows. Ta Gnome, kai KDE, , einai yperoxa! Dokimaste ta kai de 8a nostalghsete ta Windows pote jana... 8. Ry8mizontas to susthma 8.1. Arxeia arxikopoihshs systhmatos Duo shmantika arxeia toy DOS einai ta AUTOEXEC.BAT kai CONFIG.SYS, poy xrhsimopoiountai kata thn ekkinhsh gia na arxikopoihsoyn (initialise) to susthma, na 8esoyn kapoies metablhtes periballontos, opws PATH kai FILES, kai pi8anws na ekkinhsoyn ena programma h arxeio batch file. Sto Linux yparxoyn polla eidh arxeiwn arxikopoihshs, me merika ek twn opoiwn kalutera na mhn asxolh8eite, ews otoy eiste sigoyroi gia to ti kanete. Ta shmantikotera einai: ARXEIA SHMEIWSEIS /etc/inittab mhn to peirazete gia thn wra! /etc/rc.d/* omoiws An ayto poy 8elete einai aplws na 8esete thn PATH kai alles metablhtes periballontos, na allajete ta mhnumata login h na jekinate aytomata ena programma meta to login, deite ta akoloy8a arxeia: ARXEIO SHMEIWSEIS /etc/issue 8etei to mhnyma prin to login /etc/motd 8etei to mhnyma meta to login /etc/profile 8etei thn $PATH kai alles metablhtes, klp. /etc/bashrc 8etei ta aliases, tis leitourgies (functions), klp. /home/your_home/.bashrc 8etei ta proswpika sas aliases kai leitoyrgies /home/your_home/.bash_profile `h /home/your_home/.profile 8etei to periballon kai ksekina ta programmata sas An to teleytaio arxeio yparxei hdh (prokeitai gia kryfo arxeio), 8a diabastei meta to login, kai oi entoles toy 8a ektelestoun. Gia paradeigma, koitajte ayto to .bash_profile: ______________________________________________________________________ echo Environment: printenv | less # equivalent of command SET under DOS alias d='ls -l' # easy to understand what an alias is alias up='cd ..' echo "I remind you that the path is "$PATH echo "Today is `date`" # use the output of the command 'date' echo "Have a good day, "$LOGNAME # The following is a "shell function" ctgz() # List the contents of a .tar.gz archive. { for file in $* do gzip -dc ${file} | tar tf - done } # end of .profile ______________________________________________________________________ Oi $PATH kai $LOGNAME, opws 8a katalabate, einai metablhtes periballontos. Yparxoyn polles akomh· gia paradeigmata, RMP sxetika me tis efarmoges less kai bash. Bazontas thn parakatw grammh sto /etc/profile 8a exete to akribes antistoixo toy PROMPT $P$G: export PS1="\w\\$ " 8.2. Arxeia arxikopoihshs programmatwn Sto Linux ta panta sxedon mporei na ry8mistei stis anagkes sas. Ta perissotera programmata exoyn ena h perissotera arxeia arxikopoihshs ta opoia mporeite na mastorecete. Synh8ws onomazontai .onoma_programmatosrc ston oikeio katalogo sas. Ta prwta poy 8a 8elhsete na metatrecete einai: · .inputrc: xrhsimopoieitai apo to bash gia na ka8orisei ta key bindings (=desmeuseis plhktrwn;)· · .xinitrc: xrhsimopoieitai apo to startx gia na arxikopoihsei to X Window System· · .fvwmrc: xrhsimopoieitai apo ton diaxeiristh para8urwn fvwm. · .joerc, .jstarrc: xrhsimopoieitai apo ton syntakth keimenoy joe; · .jedrc: xrhsimopoieitai apo ton syntakth keimenoy jed; · .pinerc: xrhsimopoieitai apo to programma hl. allhlografias pine; · .Xdefault: xrhsimopoieitai apo polla programmata gia X. Gia ola ayta kai gia osa synanthsete argotera, RMP. 8a sas endiefere isws na deite to Configuration HOWTO, . 9. 8emata Diktuwshs H «sundesh mesw thlefwnoy» (Dialup Networking) oxi apla yparxei sto Linux, alla einai sta8eroterh kai grhgoroterh. To prwtokollo poy xrhsimopoioume einai to PPP, poy xrhsimopoieitai gia th sundesh ypologistwn sto Diadiktyo mesw modems. Xreiazeste enan pyrhna me yposthrijh PPP kai ena ergaleio poy na thlefwnei kai kanei th sundesh. Gia na parete thn allhlografia sas apo ton diakomisth toy Paroxea (ISP) sas xreiazeste ena katallhlo ergaleio («email fetcher») poy xrhsimopoiei prwtokollo POP protocol· otan h allhlografia sas «katebei» 8a fainetai san na estalh kat' ey8eian ston ypologisth sas. Sth synexeia, 8a xrhsimopoihsete ena programma diaxeirishs hlektronikhs allhlografias (MUA = Mail User Agent) opws to pine, to mutt, to elm kai diafora alla. Enw sta Windows to programma poy thlefwnei, o dialer jekina aytomatws ka8e fora poy jekinate mia diadiktyakh efarmogh, sto Linux ta pragmata leitoyrgoun anapoda: prwta thlefwneite kai meta jekinate thn efarmogh. An protimate omws thn proanafer8eisa me8odo mporeite na xrhsimopoihsete to diald. H egkatastash kai xrhsh ths thlefwnikhs sundeshs htan mia ek twn dyskoloterwn diadikasiwn sto Linux· twra ta pragmata exoyn aplopoih8ei. Gia perissoteres plhrofories symboyley8eite to Configuration HOWTO. Telos, kapoia logia gia thn «Perioxh Diktuoy» (Network neighborhood): mporeite na kanete ton sta8mo ergasias sas poy trexei Linux na emfanizetai opws san na trexate Windows NT/9x se ena topiko diktyo ypologistwn Windows! 8a xrhsimopoihsete to Samba: oxi ton omwnymo Brazilianiko xoro, alla mia efarmogh toy prwtokolloy SMB gia Linux. Sxetika deite sto . 10. Stoixeia Programmatismou 10.1. Senaria floiou: kata polu anwtera twn arxeiwn .bat An xrhsimopoiousate arxeia .BAT gia na kataskeyasete syntomeuseis polu megalwn entolwn sto DOS(egw to ekana syxna), twra sto Linux mporeite na eisagete katallhla alias (deite to parapanw paradeigma) sto profile h to .bash_profile. An omws ta arxeia .BAT sas htan pio poluploka, tote 8a trela8eite me thn glwssa senariwn (scripting language) poy sas parexei to kelyfos: einai to idio dynath oso kai h palia kalh QBasic, an oxi dynatoterh. Exei metablhtes, domes opws while, for, case, if... then... else, kai polles alles dynatothtes: einai mia kalh enallaktikh se mia «pragmatikh» glwssa programmatismou. Gia na gracete ena senario - to antistoixo toy arxeioy .BAT sto DOS - arkei na gracete ena aplo arxeio ASCII poy na periexei tis entoles sas, na to swsete kai na to kanete ektelesimo me thn entolh chmod +x . Gia na to ektelesete, gracte to onoma toy. Mia proeidopoihsh: o basikos syntakths keimenoy toy systhmatos einai o vi, kai apo thn empeiria moy synagw oti oi perissoteroi xrhstes dyskoleuontai polu kata th xrhsh toy. Den 8a ejhghsw th xrhsh toy: diabaste to biblio toy Matt Welsh h cajte gia enan odhgo sto Diadiktyo. 8a pw omws oti: · gia na eisagete keimeno, pathste i kai meta to keimeno sas· · gia na diagracete xarakthres, pathste kai meta x· · gia na bgeite apo ton vi xwris na swsete to keimeno, plhktrologeiste kai meta :q! · gia na swsete to keimeno sas kai na bgeite, plhktrologeiste kai meta :wq. Enas kalos syntakths keimenoy gia arxarioys einai o joe poy jekina plhktrologwntas jstar. Exete tis idies syntomeuseis plhktrwn opws stoys syntaktes toy DOSWin editor. O jed sto WordStar h se morfh IDE einai akomh kaluteros. An 8elete symboyleyteite thn enothta ``Pou 8a breite efarmoges'' gia na deite pou 8a breite aytous toys syntaktes. H syggrafh senariwn sto bash einai ena ejairetika axanes 8ema kai xreiazetai ena biblio apo mono toy! Gi' ayto kai de 8a ypeisel8w perissotero. 8a sas dwsw omws ena paradeigma senarioy kelufoys (shell script), ek toy opoioy mporeite na ejagete merikous basikous kanones: ______________________________________________________________________ #!/bin/sh # sample.sh # I am a comment # don't change the first line, it must be there echo "This system is: `uname -a`" # use the output of the command echo "My name is $0" # built-in variables echo "You gave me the following $# parameters: "$* echo "The first parameter is: "$1 echo -n "What's your name? " ; read your_name echo notice the difference: "hi $your_name" # quoting with " echo notice the difference: 'hi $your_name' # quoting with ' DIRS=0 ; FILES=0 for file in `ls .` ; do if [ -d ${file} ] ; then # if file is a directory DIRS=`expr $DIRS + 1` # DIRS = DIRS + 1 elif [ -f ${file} ] ; then FILES=`expr $FILES + 1` fi case ${file} in *.gif|*jpg) echo "${file}: graphic file" ;; *.txt|*.tex) echo "${file}: text file" ;; *.c|*.f|*.for) echo "${file}: source file" ;; *) echo "${file}: generic file" ;; esac done echo "there are ${DIRS} directories and ${FILES} files" ls | grep "ZxY--!!!WKW" if [ $? != 0 ] ; then # exit code of last command echo "ZxY--!!!WKW not found" fi echo "enough... type 'man bash' if you want more info." ______________________________________________________________________ 10.2. H pio C-mantikh glwssa Sto UNIX, glwssa toy systhmatos einai h C, eite mas aresei eite oxi. Par' ol' ayta einai dia8esimes kai alles glwsses, opws oi Java, FORTRAN, Pascal, Lisp, Basic, Perl, klp. 8ewrwntas ws dedomeno oti gnwrizete C, idou kapoies katey8ynthries grammes gia esas poy exete «xalasei» apo thn Turbo C++ h opoia allh ylopoihsh ths C sto DOS. Sto Linux, o metaglwttisths C legetai gcc kai den exei kamia apo tis fanfares poy kata kanona synodeuoyn tis DOS- adikes ylopoihseis: den yparxei IDE, boh8eia on-line, enswmatwmenh yphresia aposfalmatwshs (integrated debugger) klp. Einai aplws kai monon enas metaglwttisths gia th grammh entolwn, polu dynatos kai apotelesmatikos. Gia na metaglwttisete ton kwdika hello.c 8a plhktrologhsete: $ gcc hello.c to opoion 8a dhmioyrghsei ena ektelesimo arxeio onomati a.out. Gia na dwsete sto ektelesimo allo onoma, plhktrologeiste: $ gcc -o hola hello.c Gia na syndesete mia biblio8hkh me ena programma, pros8este to diakopth -l. Paradeigmatos xarin, gia na syndesete th ma8hmatikh biblio8hkh: $ gcc -o mathprog mathprog.c -lm (O diakopths -l anagkazei ton gcc na syndesei th biblio8hkh /usr/lib/lib.so· opote, o -lm syndeei to /usr/lib/libm.so). Wraia mexri stigmhs. Otan, omws, to programma sas apoteleitai apo diafora phgaia arxeia, tote xreiazeste to programma make. As ypo8esoyme oti exete gracei enan expression parser. To phgaio arxeio toy einai to parser.c kai ayto periexei (#includes) duo arxeia header, ta parser.h kai xy.h. 8elete twra na xrhsimopoihsete tis roytines toy parser.c se ena allo programma, estw to calc.c, to opoio sth synexeia periexei (#includes) to parser.h. Mplejimo! Ti prepei na kanete gia na metaglwttisete to calc.c; 8a prepei na gracete to legomeno Makefile, to opoio deixnei ston metaglwttisth tis ejarthseis metaju twn phgaiwn arxeiwn kai twn arxeiwn object. Sto paradeigma mas: ______________________________________________________________________ # This is Makefile, used to compile calc.c # Press the key where indicated! calc: calc.o parser.o gcc -o calc calc.o parser.o -lm # calc depends on two object files: calc.o and parser.o calc.o: calc.c parser.h gcc -c calc.c # calc.o depends on two source files parser.o: parser.c parser.h xy.h gcc -c parser.c # parser.o depends on three source files # end of Makefile. ______________________________________________________________________ Swste ayto to arxeio ws Makefile kai plhktrologeiste make gia na metaglwttisete to programma sas· enallaktika, swste to ws calc.mak, plhktrologeiste make -f calc.mak, kai bebaiws RMP! Mporeite na breite kapoia boh8eia sxetika me tis synarthseis ths C poy kaluptontai apo tis selides egxeiridioy (man pages), tomeas 3· gia paradeigma, $ man 3 printf Gia na aposfalmatwsete ta programmata sas (debug) xrhsimopoieiste to gdb. Gia na ma8ete pws na to xrhsimopoieite: info gdb. Yparxoyn polles dia8esimes biblio8hkes· anamesa stis prwtes poy 8a 8elhsete na xrhsimopoihsete einai oi ncurses (efe se textmode), kai svgalib (grafika konsolas). An eiste arketa gennaioi na asxolh8eite me ton programmatismo sto X11 (den einai toso duskolo), idou kapoies biblio8hkes poy dieykolunoyn th syggrafh programmatwn se X11. Deite sto , exontes yp' och oti to Gtk arxise na ginetai to protypo sto Linux. Polloi syntaktes keimenoy droyn ws IDE, gia paradeigma oi emacs kai jed, exoyn th dynatothta gia fwtismo suntajhs (syntax highlighting), aytomath paragrafopoihsh (indent), kai alla. Enallaktika, katebaste to paketo rhide apo ton topo . Einai enas klwnos toy Borland IDE kai pisteuw 8a sas aresei. 11. To ypoloipo 1% Mallon perissotero apo 1%... 11.1. H xrhsh twn tar kai gzip Sto UNIX yparxoyn kapoies eyrews xrhsimopoioumenes efarmoges gia thn dhmioyrgia paketwn (archives) kai th sympiesh arxeiwn. To tar xrhsimopoieitai gia thn kataskeyh paketwn - opws to PKZIP h to Winzipme th diafora oti den sympiezei, apla «paketarei». Gia na ftiajete ena neo paketo: $ tar -cvf [file...] Gia na ejagete (extract) arxeia apo ena paketo: $ tar -xpvf [file...] Gia na deite ta periexomena enos paketoy: $ tar -tf | less Mporeite na sympiesete me to compress, to opoion einai pleon aphrxaiwmeno kai kalon einai na mh xrhsimopoieitai pleon, kai me to gzip: $ compress $ gzip Etsi dhmioyrgeitai ena sympiesmeno arxeio me katalhjh .Z (apo to compress) h .gz (apo to gzip). Ayta ta programmata mporoun na sympiesoyn mono ena arxeio ka8e fora. Gia thn aposympiesh: $ compress -d $ gzip -d RMP. Yparxoyn epishs ta programmata unarj, zip kai unzip (symbata me to PK??ZIP) . Arxeia me katalhjh .tar.gz h .tgz (paketarismena me tar, en synexeia sympiesmena me gzip) einai toso syxna sto UNIX oso kai ta arxeia .ZIP sto DOS. Gia na deite ta periexomena enos arxeioy .tar.gz: $ tar -ztf | less 11.2. Egkatastash efarmogwn Kat' arxas na dieykrinisoyme kati: h egkatastash efarmogwn einai ypo8esh toy root. Oi perissoteres efarmoges toy Linux dianemontai ws paketa .tar.gz, poy kata kanona periexoyn enan katalogo me katallhlo onoma periexonta arxeia kai/h ypokatalogoys. Enas kalos kanonas einai na egka8istate ayta ta paketa apo to /usr/local me thn entolh # tar -zxf kai en synexeia diabazontas to arxeio README h INSTALL. Stis perissoteres periptwseis, h efarmogh dianemetai ws phgaios kwdikas, ton opoio 8a prepei na metaglwttisete· synh8ws, arkei na plhktrologhsete make kai meta make install. An to paketo (archive) periexei to senario configure, trejte to prohgoymenws. Profanws, 8a xreiasteite to metaglwttisth gcc h g++. Alla paketa prepei na «anoix8oun» (unpack) ston katalogo /· etsi symbainei me ta paketa .tgz toy Slackware. Alla paketa periexoyn ta arxeia, alla oxi mesa se ypokatalogo, opote prepei na prosexete gia na mhn mplexteite. Pantote na blepete ta periexomena enos paketoy prin to egkatasthsete. To Debian kai to Red Hat exoyn tis dikes toys morfes paketwn, ta .deb kai .rpm antistoixws. To teleytaio malista xairei eyreias apodoxhs. Gia na egkatasthsete ena paketo rpm plhktrologeiste # rpm -i package.rpm 11.3. Xrhsimes symboyles Kulish pros ta pisw: patwntas (to gkrizo plhktro) mporeite na kylate pros ta pisw (backscroll) merikes selides, analogws posh mnhmh video exete dia8esimh. Ka8arismos ths o8onhs: an xrhsimopoihsete tis more h cat se ena dyadiko arxeio (binary file), h o8onh sas pi8anws na gemisei me skoypidia. Gia na to dior8wsete plhktrologeiste (xwris na blepete) (blind type) reset h thn parakatw seira xarakthrwn: echo CTRL-V ESC c RETURN. Epikollhsh keimenoy: gia thn konsola, deite katw8i· otan eiste sto X, pathste me to pontiki (click) kai meta surte gia na epilejete keimeno se ena para8yro xterm kai sth synexeia pathste to mesaio plhktro toy pontikiou (h kai ta duo taytoxronws an exete pontiki duo plhktrwn) gia na epikollhsete. Yparxei akomh kai to xclipboard (dystyxws mono gia keimeno), omws mh mperdeyteite apo thn argh toy apodosh. Xrhsh toy pontikiou: an exete egkatasthsei ton gpm, enan odhgo pontikiou gia thn konsola, mporeite na pathsete kai na surete (click and drag) gia na epilejete keimeno kai meta deji klik gia na epikollhsete to epilegen keimeno. Leitoyrgei anamesa stis phgaies konsoles (VC). Mhnumata toy pyrhna: rijte mia matia sto /var/adm/messages h /var/log/messages ws root gia na deite ti exei na sas pei o pyrhnas, symperilambanomenwn twn mhnymatwn ekkinhsews. Isws breite praktikh thn entolh dmesg. 11.4. Pou 8a breite efarmoges An anarwtieste pou 8a breite efarmoges gia to Linux sas gia na antikatasthsete aytes poy xrhsimopoiousate sto DOS/Win sas proteinw toys basikous topoys logismikou gia Linux: , , kai . Alloi kaloi topoi gia arxh einai o «`Linux Applications and Utilities Page» , kai h «epishmh» istoselida toy Linux . 11.5. Kapoia pragmata poy de mporousate na kanete To Linux mporei na kanei polla pragmata poy gia ta DOS/Windows htan fortika, duskola h akomh adunata. Idou kapoies eykolies poy mporeite na geyteite: · h entolh at sas epitrepei na trexete programmata se mia sygkekrimenh xronikh stigmh· · h awk einai mia aplh, alla dynath glwssa poy sas epitrepei na metaxeirizeste arxeia dedomenwn kai oxi mono. Paradeigmatos xarin, an data.dat einai ena arxeio dedomenwn me polla pedia, tote h entolh $ awk '$2 ~ "abc" {print $1, "\t", $4}' data.dat typwnei ta pedia 1 kai 4 ka8emias grammhs toy data.dat ths opoias to deutero pedio periexei ta «abc»· · to cron einai polu xrhsimo gia na ektelei diafores ergasies periodikws, se sygkekrimenh hmeromhnia kai wra. Plhktrologeiste man 5 crontab· · to file sas leei ti eidoys arxeio einai to onoma_arxeioy (keimeno ASCII, ektelesimo, paketo klp)· · h find (deite epishs ton Tomea ``Katalogoi: Metafrash Entolwn'') einai mia apo tis pio dynates kai xrhsimes entoles. Xrhsimopoieitai gia na briskei arxeia poy apantoun se orismena xarakthristika kai na ektelei ergasies se ayta. H genikh xrhsh ths find einai: $ find opoy h periexei krithria ereynas kai ergasies. Paradeigmata: $ find . -type l -exec ls -l {} \; briskei osa arxeia einai symbolikoi desmoi kai typwnei to arxeio sto opoio deixnoyn. $ find / -name "*.old" -ok rm {} \; briskei ola ta arxeia toy zhtoumenoy eidoys kai ta diagrafei, zhtwntas prwta thn adeia sas. $ find . -perm +111 briskei ola ta arxeia me dikaiwma (permission) 111 (ektelesima). $ find . -user root briskei ola ta arxeia poy anhkoyn ston root. Ayth exei polles dyna- tothtes - RMP· · h grep briskei protypa keimenoy (text patterns) sta arxeia. Gia paradeigma, h $ grep -l "geology" *.tex briskei ta arxeia *.tex poy periexoyn thn lejh «geology». H parallagh ths, zgrep, leitoyrgei sta sympiesmena arxeia gzip. RMP· · Oi synh8eis ekfraseis einai enas poluplokos, alla polu dynatos tropos ereynas se keimeno. Gia paradeigma, h entolh ^a[^a- m]X{4,}txt$ briskei mia grammh poy jekina me `a', akoloy8ei opoiosdhpote xarakthras ektos aytwn toy diasthmatos a-m, akoloy8oun tessera h perissotera `X', kai teleiwnei se `txt'. Mporeite na xrhsimopoihsete synh8eis ekfraseis me aneptygmenoys syntaktes, opws o less, kai se polles efarmoges. Gia mia eisagwgh plhktrologeiste man grep· · h script stelnei ta periexomena ths o8onhs sto onoma_senarioy ews otoy dwsete thn entolh exit. Xrhsimh gia aposfalmatwsh· · h sudo epitrepei stoys xrhstes na ekteloun kapoies apo tis leitoyrgies toy root (p.x. diamorfwsh kai prosarmogh diskwn· RMP)· · h uname -a sas dinei plhrofories gia to susthma· · oi zcat kai zless epitrepoyn thn perihghsh kai piping se gzip- arismena arxeia, xwris thn prohgoumenh aposympiesh toys. Gia paradeigma: $ zless textfile.gz $ zcat textfile.gz | lpr · oi parakatw entoles einai epishs xrhsimes: bc, cal, chsh, cmp, cut, fmt, head, hexdump, nl, passwd, printf, sort, split, strings, tac, tail, tee, touch, uniq, w, wall, wc, whereis, write, xargs, znew. RMP. 11.6. Ejaskhsh toy UNIX ypo DOS/Windows Einai apisteyto, alla yparxoyn ejaireta ergaleia poy prosferoyn ena UNIX-oeides periballon sto DOS/Windows! Ena apo ayta einai h soyita Djgpp ( ) gia DOS, enw to to Cygnus ( ) einai mia polyplokoterh metafora sto Win32. Amfotera periexoyn ta idia ergaleia anaptyjhs GNU me to Linux· par' ola ayta de 8a exete thn idia sta8erothta kai apodosh... An 8elete na parete mia geush apo to Linux, dokimaste to Djgpp. Katebaste kai egkatast eiste ta parakatw arxeia (th stigmh poy grafw ayto, h teleytaia ekdosh einai h 2.02): djdev202.zip, bnu281b.zip, bsh1147b.zip, fil316b.zip, find41b.zip, grep22b.zip, gwk303b.zip, lss332b.zip, shl112b.zip.. Parexontai odhgies egkatastashs kai peraiterw boh8eia mporeite na breite ston topo . Eidikotera, h xrhsh toy bash sto DOSWin einai megalh anakoufish. Gia na to ry8misete katallhlws, dior8wste to parexomeno arxeio BOOT.BAT wste na apeikonizei thn egkatastash sas, kai sth synexeia topo8eteiste ayta ta arxeia ston oikeio katalogo sas (sth diamerish twn Windows ) anti aytwn poy parexontai: # this is _bashrc LS_OPTIONS="-F -s --color=yes" alias cp='cp -i' alias d='ls -l' alias l=less alias ls="ls $LS_OPTIONS" alias mv='mv -i' alias rm='rm -i' alias u='cd ..' # this is _bprof if [ -f ~/_bashrc ]; then . ~/_bashrc fi PS1='\w\$ ' PS2='> ' CDPATH="$CDPATH:~" # stuff for less(1) LESS="-M-Q" # makrys dromeas, siwphlos LESSEDIT="%E ?lt+%lt. %f" # dior8wsh prwths grammhs VISUAL="jed" # syntakths LESSCHARSET=latin1 # kalyterh orash tonismenwn grammatwn export PS1 PS2 CDPATH LS_OPTIONS LESS LESSEDIT LESSOPEN VISUAL LESSCHARSET 11.7. Synh8eis epektaseis kai sxetizomena programmata 8a synanthsete diafores epektaseis arxeiwn. Ejairwntas tis pio spanies (p.x. grammatoseires klp), aytes einai: · 1 ... 8: selides egxeiridioy (man pages). Diabaste tis me groff -Tascii -man · · arj: paketa kataskeyasmena me arj· · dvi: arxeio paragomeno apo to TeX (bl. parakatw). Xrhsimopoieiste xdvi gia na to deite, dvips gia na to trecete se arxeio PostScript .ps· · gz: paketa kataskeyasmena me gzip· · info: arxeia info (kati san enallaktika twn man pages). Deite tis me info· · lsm: Linux Software Map file. Einai apla arxeia ASCII poy periexoyn thn perigrafh enos paketoy· · ps: arxeio PostScript. Gia na to deite h na to typwsete xrhsimopoieiste to gs kai enallaktika ghostview h gv· · rpm: paketa Red Hat. Mporeite na ta egkatasthsete se ka8e susthma me ton diaxeiristh paketwn rpm· · taz, tar.Z: paketa, kataskeyasmena me tar kai sympiesmena me compress· · tgz, tar.gz: paketa kataskeyasmena me tar kai sympiesmena me gzip· · tex: arxeio keimenoy pros eisagwgh sto TeX, ena pantodunamo susthma stoixeio8esias. «Tsimphste» to paketo tex, dia8esimo se polles dianomes· · texi: arxeio texinfo, mporei na dhmioyrghsei toso TeX oso kai info arxeia (info). Parte to texinfo· · xbm, xpm, xwd: arxeio grafikwn· · Z: paketo kataskeyasmeno me compress· 11.8. Metatroph Arxeiwn An xreiazeste na metaferete arxeia anamesa sto DOS/Win kai to Linux, exete yp' och to problhma «teloys grammhs» («end of line» problem). Sto DOS, ka8e grammh keimenoy teleiwnei me CR/LF (dhladh ASCII 13 + ASCII 10), enw sto Linux me LF. An dior8wsete ena arxeio toy DOS mesa apo to Linux, pi8anotata ka8e grammh 8a teleiwnei me ena periergo «M»· ena arxeio keimenoy toy Linux sto DOS 8a fainetai san ws mia aplh xiliometrikh grammh xwris paragrafoys. Gia th swsth metatroph twn arxeiwn yparxoyn kapoia ergaleia, ta dos2unix kai unix2dos. An exete arxeia mono keimenoy poy periexoyn tonismenoys xarakthres, sigoyreyteite oti exoyn ginei mesa apo ta Windows (me Notepad) kai oxi se aplo DOS· diaforetika, oloi oi tonismenoi xarakthres 8a mperdeytoun. H metatroph arxeiwn Word h WordPerfect se aplo keimeno einai dynath, an kai kapws epikindynh. 8a xreiasteite kapoio apo ta ergaleia poy yparxoyn stoys topoys toy CTAN· enas einai o . Katebaste to programma word2x apo ton katalogo /pub/tex/tools/, h dokimaste kapoio apo ta programmata toy katalogoy /pub/tex/support/. Eidikotera, to word2x metatrepei arxeia Word 6, enw gia arxeia toy Word 97 8a xreias8eite to mswordview ( ) poy ta trepei se HTML. 11.9. Eleu8eres Soyites grafeioy An h metatroph arxeiwn den einai arketh, exete th dynatothta na by8istei-te se ena (eleu8ero! paketo, paromoio toy Microsoft Office. H soyita StarOffice einai eleu8erh gia idiwtikh xrhsh. Einai megalh, kapws argh, alla par' ol' ayta polu kalh: prosferei dynatothtes poy den yparxoyn sto Microsoft Office. Akomh, mporei na diabasei kai na gracei arxeia twn Word kai Excel files, an kai h metatroph den einai pantote teleia. Istoselida: . (S.t.M.: h selida exei pleon allajei, meta thn ejagora ths StarDivision apo thn Sun, kai pleon einai ) Allo kalo paketo einai to Corel WordPerfect, mia eleu8erh ekdosh toy opoioy parexetai sto Diadiktyo. Na pw ki alla; Tsimphste to! . 12. Ayta, gia thn wra! Sygxarhthria! Exete pleon arpajei kapoia pragmata sxetika me to UNIX kai eiste etoimoi na jekinhsete na doyleuete. Exete yp' och oti einai polla ayta poy den jerete gia to susthma sas, opote prepei na ejaskeiste perissotero gia na xrhsimopoieiste to Linux aneta. An ayto poy 8elate pantws htan na breite merikes efarmoges kai na arxisete na tis xrhsimopoieite, ayta poy eipa prepei na htan arketa. Exw thn pepoi8hsh oti 8a xaireste na doyleuete me to Linux kai pws ka8ws 8a pernaei o kairos 8a ma8ainete olo kai perissotera - etsi ginetai me oloys mas! Eimai epishs bebaios oti de 8a epistrecete pote sto DOSWin! Elpizw na hmoyn safhs kai na boh8hsa ikanopoihtika toys 3 h 4 anagnwstes moy. 12.1. Copyright (koph toy right;) Ektos ki an anaferetai diaforetika, ta dikaiwmata twn HOWTO toy Linux anhkoyn stoys antistoixoys syggrafeis toys. Ta HOWTO toy Linux mporoun na anaparax8oun kai na dianemh8oun ej oloklhroy h tmhmatikws, ef' oson to paron shmeiwma peri copyright paramenei se ka8e antigrafo. H emporikh anadianomh epitrepetai kai en8arrunetai· par' ol' ayta, o syggrafeas 8a h8ele na enhmerwnetai gia ka8e tetoia dianomh. Ka8e metafrash, paragwgh h synolikh ergasia, poy emporeymatopoiei opoiodhpote HOWTO toy Linux prepei na kaluptetai apo ayth th diakhryjh toy copyright. Ayto shmainei, oti den einai dynaton na parax8ei paragwgh ergasia apo ena HOWTO kai na epiblh8oun peraiterw periorismoi sthn dianomh toy. Ejaireseis aytwn twn kanonwn einai dynaton na egkri8oun ypo sygkekrimenwn proupo8esewn· apey8yn8eite ston diaxeiristh twn HOWTO toy Linux, sth dieu8ynsh poy didetai katw8i. En oligois, 8a 8elame na prow8hsoyme th diadosh aytwn twn plhroforiwn diamesoy oswn perissoterwn odwn ginetai. Par' ol' ayta, epi8ymoume na diathroume ta dikaiwmata copyright twn HOWTO toy Linux kai 8a 8elame na enhmerwnomaste gia opoia sxedia anadianomhs twn HOWTO. Gia opoies erwthseis, parakalw epikoinwnhste me ton Tim Bynum, diaxeiristh twn HOWTO toy Linux mesw hlektronikhs epistolhs sth dieu8ynsh . 12.2. Arnhsh ey8ynwn To «From DOS to Linux HOWTO» grafthke apo ton Guido Gonzato, . (Afaireste to «REMOVE_ME».) Eyxaristw polu ton Matt Welsh, syggrafea toy «Linux Installation and Getting Started», ton Ian Jackson, syggrafea toy «Linux frequently asked questions with answers», ton Giuseppe Zanetti, syggrafea toy «Linux», se oloys osoys moy esteilan hlektronikes epistoles me protaseis kai idiaitera ston Linus Torvalds kai to GNU poy mas edwse to Linux. (S.t.M.: H metafrash egine apo ton Niko 8eodwroy . Par' oti h metafrash enos HOWTO den einai idiaiterws prosferoysa pros to sunolo twn Ellhnwn Xrhstwn toy Linux, h gnwsh oti synebala estw kai ligo sthn diadosh toy leitoyrgikou, einai gia mena arketa ikanopoihtikh! Eimai bebaios oti h parousa metafrash einai gemath la8h, elpizw omws sth boh8eia olwn sas gia th dior8wsh toys. ) Ayto to eggrafo parexetai «ws exei». Katebala megalh prospa8eia na to gracw oso akribestera mporousa, alla xrhsimopoieiste tis periexomenes se ayto plhrofories me dikh sas ey8unh. Se kammia periptwsh de 8a 8ewrh8w ypeu8ynos gia opoia apwleia ofeilete se xrhsh ayths ths ergasias. Ka8e anadrash einai kalodexoumenh. Gia opoia paraklhsh, protash, brisia klp eiste eleu8eroi na epikoinwnhsete mazi moy. Na xaireste to Linux kai th zwh, Guido =8-)