Unix for TOPS-20 Users
Total Page:16
File Type:pdf, Size:1020Kb
nix for yEPH sers xelson rFpF fee e genter for ienti gomputing heprtment of wthemtis niversityof th lt vke gityD th VRIIP e elX @VHIA SVIESPSR PREtunEVU gontents I sntro dution I P ht9s in the xme P Q gommnd ro essors P R gommnd gorresp ondene S S pile ree yrgniztion IQ T serD hiretoryD nd pile xmes IU U hevie xmes IU V vogil xmes IV W ip esD sGy ediretionD nd fkground tos IW IH erminl upp ort in nix PH II iyp nd vogout PI IP gommnd elises PI IQ invironment gustomiztion PP IR qetting relp ynEline PP IS yp ertorsD heelsD nd up erE sers PQ IT smp ortnt nixools PR IU purther eding PS sndex PU i I sxyh gsyx I I sntro dution his do ument hs een written to provide strting p ointforopsEPH users who will e working on nix systemsD prtiulrly the x worksttionsF st is not smll o ok out nixY the lst setion gives pointers to severl o oks tht should prove usefulF therD it is intended to provide the reder with onnetions etween fmilir opsEPH onepts nd their nlogues on nixF nix hs often e ritiized for tersenessD lk of mnemoni ommndsD nd ommnd inonsistenyD plus for overEemphsis of intertive omputer use s opp osed to thnum er runhing4F o onsiderle extentD these ritiisms re grounded in ftF roweverD nyone who uses nix for n extended p erio d nd lerns how to mke go o d use of the multitude of to ols ville lmost without exeption eomes onvertF hespite its wrtsD nix is in mnywys very eutiful op erting system whih hs hdD nd ontinues to hveD enorE mous inuene on op erting systems designD progrmming lngugesD softwre developmentenvironmentsD nd even on hrdwreofseverl new rhiteturesF sts lenD sleekD design n e ttriuted lrgely to the smll numer of very tlented reserhers t e8 fell v ortories who develop ed it for the rst severl yers of its rst existene on hEIID with susequent p orts to sfw QUH nd roneywell qgy systemsF everl of them deservemention hereD for you will see their nmes mentioned frequently in nix ooksD litertureD nd do umenttionX uen hompson for the op erting system kernel nd le systemY hennis ithie for the g lngugeY teve tohnson for the ortle g ompilerD nd the y nd lex ompiler genertor to olsY frin uernighnD eter ein ergerD nd el eho for numerous softwre to ols nd o oks out nix nd gY tu peldmn for the rst portrn UU ompiler nywhereD fUUD nd for mkeD p ossily the llEtime gretest softwretoolever writtenF smplementtions of nix run on mhines s smll s the sfw gD nd s lrge s the gryPF ith only few exeptions @ghgD pujitsuD nd sfwAD nerly every new sup eromputer intro dued to the mrket sine IWVS hsD or will so on hveD nixF xo other op erting system in the world runs on so mny dierent hrdwre rhiteturesD providingD for the rst time in omputing9s fortyEyer historyD the p ossiility of true progrmmer nd softwre p ortility ross mulE tiple rhiteturesF prom mngement9s p oint of viewD this should mkeitmuh esier to hose omputers more on the sis of hrdwre p erformneD nd less on mintining the sttus quo tht hs left minfrme omputing environments only sup erilly dierent thn they were in IWTQ when the rst multiEmo del rhitetureD the sfw QTH seriesD ws intro duedF P re9 sx ri xewi P P ht9s in the xme uen hompson hose the nme nix s pun on the op erting system wultisD from whih it orrowed mny idesF he initil implementtion on the hEII ws in ssemly o deD ut this ws so on rewritten in the g lngugeF hennis ithie develop ed g from fD whih in turn me from fgvD one of the rst p ortle systems progrmming lngugesF fgv nd f still existD nd f hs pro dued desendntD wrgyD whih is used to write the terlo o wple lger systemF g hs ompletely overshdowed them howeverF e8 fell v ortories hs trdemrked the nme nixD so other vendors who liense it from them must usully ome up with new nmesF e8 hs now gone through puli releses of ersion TD ersion UD ystem sssD ystem D f @rogrmmer9s ork enhAD nd hf @ho umenter9s ork enhAF ersion V is in developmentinternllyF ferkeley hs hd RFHD RFID RFPD nd RFQ of fh @ferkeley tndrd histriE utionA nixF heir ontriutions to nix re legionY the most signintre the originl p ort to the hig e rhitetureD the ddition of virtul memory pging supp ortD the fst le systemD the g shell @shAD nd gGs networking supp ortF rewlettEkrd lls theirs r Y it is sed on ystem with ferkeley extensionsF un9s implementtion is lled nix in their do umenttionY they re pE prently liensed to do soF st is sed on RFQ fh with ystem omptiilityD nd un is working together with e8 to pro due ommon nix merging the fetures of oth these m jor implementtionsF siii hs pulished p ortle op erting system interfe denition lled ysD derived from suset of ersion UD ystem s s sD nd ystem F qould9s implementtion is EQPF he sfw version is lled esF yn the gry PD it is lled xsgyF yn the sfw gD we hve enix from enturegomD nd enix from wiE rosoftF xo o dy to my knowledge hs yet pro dued lenedEup version lled uleenixF Q gommnd ro essors nix oers vriety of ommnd pro essorsD lled shellsD whih re nlogous to omintions of the opsEPH iigD wsgD nd gv F he originl oneD shD is known s the fourne shellD fter its uthorD teve fourneF he most populr one in ferkeley nix environments is fill toy9s shD the g shellD so lled euse of its resemlne to the g progrmming lngugeF sh oers etter progrmmilityD ommnd historyD ommnd lisE ingD nd imp ortntlyD jo ontrol llowing strting nd stopping foreground nd Q gywwexh ygiy Q kground josF e newer shell is the uorn shellD kshD whih omines fetures of oth sh nd shD nd oers ommnd funtions nd imsEstyle ommnd editingF he fpsh is fkus funtionlEprogrmming style shellF xeither ksh nor fpsh hs reeived wide distriutionD ut ksh myeventully reple sh if it reeives strong e8 kingF sn un nixD shells nd other progrms myeonveniently run in winE dowing environmentY see the mn pges on dxtoolD shelltoolD suntoolsDnd tektoolF nlikethe opsEPH iigD nix shells hve only smll num er of uiltEin ommndsD nd these re exlusively for ontrol of shell optionsF ht orreE sp onds to most iig ommnds re tul exeutle progrms whose nmes re not known to the nix shellsY they must therefore e typ ed without E revitionF hey re serhed for in the le system in hin of diretories dened ytheer environmentvrileD muh like the opsEPH X logil nmeF por this resonD nd lso euse nix ws originlly develop ed on slow teletyp e printing terminlsD nix ommnds tend to e shortD with mny PE nd QEletter ommndsF he opsEPH iig hs knowledge of the syntx for ll of its uiltEin omE mndsD nd gv gives ordinry users the ility to dd new ones whih re indistinguishle from iig ommnds s fr s their user interfe is onE ernedF hen you typ e something like gywsvi GcD the iig knows wht swithes re villeD nd will disply them in resp onse to your queryDutno ttempt hs een mde to lod ny prtiulr ompiler into memoryF e progrm whose syntx is not uiltEin to the iigD suhs pyeFiiDnnotgiveyou help until it is runningF ht is why pye Gc do es not workD ut pye followed y rrige return nd Gc do esD sine y tht timeD the progrm is exeutingF he prtiulr order of swithes nd lenmes on the ommnd line is up to who ever dened the prsing syntxD nd onsequentlyD opsEPH ommnds exhiit vriety of stylesD inluding su ommnd mo desD suh s used y the f svh nd hsigy ommndsD whih hve lrge numer of optionsF sn nixD the shells do not rry uiltEin knowledge of individul progrm options nd lenme exp ettionsF snstedD they ssume tht l l ommnds re invoked with the syntx ommndver foptionl swithesg filelistF withes re onventionlly prexed yhyphen @though there re exeptionsD suhstr nd rAF sn nyeventD everything fter the ommndver is ssumed to e p otentil lelistD nd the text is snned for wildrd hrters @whih use lenme expnsionAD nd the ommnd line is expnded into list of lnkEseprted rgumentsF he min routine in the progrm itself is then presented with two prmeters|n integer ount of the num er of rgumentsD nd vetor of p ointers to eh of the rgumentsF por mny purp osesD this is quite dequteF xo progrm hs to hndle wildE rd expnsionD sine it sees only the nl list of ommndEline rgumentsF Q gywwexh ygiy R yption prsing is simple euse the initil hrter of eh rgument is exE mined to see whether it is hyphen or notY if it isD n option swith is ssumedD nd the remining hrters of the rgument re further exmined to lssify the rgumentF ytherwiseD the rgument is ssumed to e lenmeF here re severl disdvntges of this pprohF xo inEline help is ville from the shellD like it is with the opsEPH iigF his is serious wofessentilly every other op erting system ut opsEPHD nd fores user who hs prtilly typ ed ommnd line nd then forgotten the nme of swithtoreh for printed mnulD or ort the typ ein nd go serh for onEline do umenttionF snvlid syntx in the ommnd line is not deteted until the progrm hs lredy een lo ted in the le systemD loded into memoryD nd strtedD whihwstes system resouresF ine typ ogrphil errors re ommonD this hpp ens frequentlyF he lenme expnsion done y the shell is limited to the size of the p ointer vetor uerD whih is unfortuntely xed when the shell is uiltF elthough it is lrgeD it is not lrge enough to hold expnsions of severl lrge diretoriesY for exmpleD ls El GusrGmnGmncGB overows the shell uer nd the ommnd do es nothingF feuse the shells hndle wildrd expnsionD everyone ssumed tht would lwys e suientD nd no nix lirry tht s m wre of proE vides userEllle funtion for wildrd expnsionF husD progrm like nix uermit nnot hndle get BFB ommndD unless tht request ws on the ommnd lineF ixpnding wildrds implies serhing the le systemD nd the wy tht the shellsD nd progrms like trDhve done this is to red the diretory les themselvesD mking user o de unneessrily knowledgele out deE tils tht relly should