Tải bản đầy đủ (.pdf) (2,284 trang)

OReilly UNIX in a nutshell 4th edition oct 2005 ISBN 0596100299

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (5.49 MB, 2,284 trang )

UnixinaNutshell,4thEdition
ByArnoldRobbins
...............................................
Publisher:O'Reilly
PubDate:October2005
ISBN:0-596-10029-9
Pages:906

TableofContents|Index

Asanopenoperatingsystem,Unixcanbeimprovedonbyanyoneandeveryone:
individuals,companies,universities,andmore.Asaresult,theverynatureofUnix
hasbeenalteredovertheyearsbynumerousextensionsformulatedinanassortment
ofversions.Today,UnixencompasseseverythingfromSun'sSolaristoApple'sMac
OSXandmorevarietiesofLinuxthanyoucaneasilyname.
ThelatesteditionofthisbestsellingreferencebringsUnixintothe21stcentury.It's
beenreworkedtokeepcurrentwiththebroaderstateofUnixintoday'sworldand
highlightthestrengthsofthisoperatingsysteminallitsvariousflavors.
DetailingallUnixcommandsandoptions,theinformativeguideprovidesgenerous
descriptionsandexamplesthatputthosecommandsincontext.Herearesomeofthe
newfeaturesyou'llfindinUnixinaNutshell,FourthEdition:
Solaris10,thelatestversionoftheSVR4-basedoperatingsystem,GNU/Linux,
andMacOSX
Bashshell(alongwiththe1988and1993versionsofksh)
tschshell(insteadoftheoriginalBerkeleycsh)
Packagemanagementprograms,usedforprograminstallationonpopular
GNU/Linuxsystems,SolarisandMacOSX
GNUEmacsVersion21
Introductiontosourcecodemanagementsystems



Concurrentversionssystem
Subversionversioncontrolsystem
GDBdebugger
AsUnixhasprogressed,certaincommandsthatwereoncecriticalhavefalleninto
disuse.Tothatend,thebookhasalsodroppedmaterialthatisnolongerrelevant,
keepingittautandcurrent.
Ifyou'reaUnixuserorprogrammer,you'llrecognizethevalueofthiscomplete,upto-dateUnixreference.Withchapteroverviews,specificexamples,anddetailed
command.


UnixinaNutshell,4thEdition
ByArnoldRobbins
...............................................
Publisher:O'Reilly
PubDate:October2005
ISBN:0-596-10029-9
Pages:906

TableofContents|Index



Copyright



Dedication




Preface



Audience



ScopeofThisBook



Conventions



UsingCodeExamples



Safari®Enabled



HowtoContactUs



Acknowledgments





PartI:CommandsandShells
Chapter1.Introduction



Section1.1.Unixinthe21stCentury



Section1.2.ObtainingCompilers



Section1.3.BuildingSoftware



Section1.4.What'sintheQuickReference



Section1.5.Beginner'sGuide



Section1.6.Solaris:StandardCompliantPrograms




Chapter2.UnixCommands



Section2.1.Introduction



Section2.2.AlphabeticalSummaryofCommonCommands



Section2.3.AlphabeticalSummaryofSolarisCommands



Section2.4.AlphabeticalSummaryofGNU/LinuxCommands



Section2.5.AlphabeticalSummaryofMacOSXCommands



Section2.6.AlphabeticalSummaryofJavaCommands




Chapter3.TheUnixShell:AnOverview



Section3.1.IntroductiontotheShell



Section3.2.PurposeoftheShell



Section3.3.ShellFlavors




Section3.4.ShellSourceCodeURLs



Section3.5.CommonFeatures




Section3.6.DifferingFeatures
Chapter4.TheBashandKornShells




Section4.1.OverviewofFeatures



Section4.2.InvokingtheShell



Section4.3.Syntax



Section4.4.Functions



Section4.5.Variables



Section4.6.ArithmeticExpressions



Section4.7.CommandHistory



Section4.8.JobControl




Section4.9.CommandExecution



Section4.10.RestrictedShells



Section4.11.Built-inCommands(BashandKornShells)



Chapter5.tcsh:AnExtendedCShell



Section5.1.OverviewofFeatures



Section5.2.InvokingtheShell



Section5.3.Syntax




Section5.4.Variables



Section5.5.Expressions



Section5.6.CommandHistory



Section5.7.Command-LineManipulation



Section5.8.JobControl



Section5.9.Built-inCommands



Chapter6.PackageManagement



Section6.1.LinuxPackageManagement




Section6.2.TheRedHatPackageManager



Section6.3.Yum:YellowdogUpdaterModified



Section6.4.up2date:RedHatUpdateAgent



Section6.5.TheDebianPackageManager



Section6.6.MacOSXPackageManagement





Section6.7.SolarisPackageManagement
PartII:TextEditingandProcessing
Chapter7.PatternMatching




Section7.1.FilenamesVersusPatterns



Section7.2.Metacharacters



Section7.3.Metacharacters,ListedbyUnixProgram



Section7.4.ExamplesofSearching



Chapter8.TheEmacsEditor



Section8.1.ConceptualOverview



Section8.2.Command-LineSyntax



Section8.3.SummaryofCommandsbyGroup




Section8.4.SummaryofCommandsbyKey



Section8.5.SummaryofCommandsbyName




Chapter9.Thevi,ex,andvimEditors



Section9.1.ConceptualOverview



Section9.2.Command-LineSyntax



Section9.3.ReviewofviOperations



Section9.4.viCommands




Section9.5.viConfiguration



Section9.6.exBasics




Section9.7.AlphabeticalSummaryofexCommands
Chapter10.ThesedEditor



Section10.1.ConceptualOverview



Section10.2.Command-LineSyntax



Section10.3.SyntaxofsedCommands



Section10.4.GroupSummaryofsedCommands




Section10.5.AlphabeticalSummaryofsedCommands



Chapter11.TheawkProgrammingLanguage



Section11.1.ConceptualOverview



Section11.2.Command-LineSyntax



Section11.3.PatternsandProcedures



Section11.4.Built-inVariables



Section11.5.Operators




Section11.6.VariableandArrayAssignment



Section11.7.User-DefinedFunctions



Section11.8.Gawk-SpecificFeatures



Section11.9.ImplementationLimits



Section11.10.GroupListingofawkFunctionsandCommands



Section11.11.AlphabeticalSummaryofawkFunctionsandCommands



Section11.12.OutputRedirections






Section11.13.SourceCode
PartIII:SoftwareDevelopment
Chapter12.SourceCodeManagement:AnOverview



Section12.1.IntroductionandTerminology



Section12.2.UsageModels



Section12.3.UnixSourceCodeManagementSystems



Section12.4.OtherSourceCodeManagementSystems



Chapter13.TheRevisionControlSystem



Section13.1.OverviewofCommands




Section13.2.BasicOperation



Section13.3.GeneralRCSSpecifications



Section13.4.AlphabeticalSummaryofCommands



Chapter14.TheConcurrentVersionsSystem



Section14.1.ConceptualOverview



Section14.2.Command-LineSyntaxandOptions



Section14.3.DotFiles



Section14.4.EnvironmentVariables




Section14.5.KeywordsandKeywordModes




Section14.6.Dates



Section14.7.CVSROOTVariables



Section14.8.AlphabeticalSummaryofCommands



Chapter15.TheSubversionVersionControlSystem



Section15.1.ConceptualOverview



Section15.2.ObtainingSubversion




Section15.3.UsingSubversion:AQuickTour



Section15.4.TheSubversionCommandLineClient:svn



Section15.5.RepositoryAdministration:svnadmin



Section15.6.ExaminingtheRepository:svnlook



Section15.7.ProvidingRemoteAccess:svnserve



Section15.8.OtherSubversionComponents



Chapter16.TheGNUmakeUtility



Section16.1.ConceptualOverview




Section16.2.Command-LineSyntax



Section16.3.MakefileLines



Section16.4.Macros



Section16.5.SpecialTargetNames



Section16.6.WritingCommandLines



Chapter17.TheGDBDebugger



Section17.1.ConceptualOverview




Section17.2.Command-LineSyntax



Section17.3.InitializationFiles



Section17.4.GDBExpressions



Section17.5.TheGDBTextUserInterface



Section17.6.GroupListingofGDBCommands



Section17.7.SummaryofsetandshowCommands



Section17.8.SummaryoftheinfoCommand



Section17.9.AlphabeticalSummaryofGDBCommands




Chapter18.WritingManualPages



Section18.1.Introduction



Section18.2.Overviewofnroff/troff



Section18.3.AlphabeticalSummaryofmanMacros



Section18.4.PredefinedStrings



Section18.5.InternalNames



Section18.6.SampleDocument




PartIV:CommandsandShells



AppendixA.ISO8859-1(Latin-1)CharacterSet



Bibliography



UnixDescriptionsandProgrammer'sManuals



UnixInternals



SystemandNetworkAdministration



ProgrammingwiththeUnixMindset



ProgrammingLanguages




TCP/IPNetworking




SoftwareDevelopment



Emacs



Standards



O'ReillyBooks



AbouttheAuthor



Colophon




Index


UnixinaNutshell,FourthEdition
byArnoldRobbins
Copyright©1995O'Reilly&Associates,Inc.Allrightsreserved.
PrintedintheUnitedStatesofAmerica.
PublishedbyO'Reilly&Associates,Inc.,101MorrisStreet,Sebastopol,CA
95472.
O'Reillybooksmaybepurchasedforeducational,business,orsalespromotional
use.Onlineeditionsarealsoavailableformosttitles(safari.oreilly.com).For
moreinformation,contactourcorporate/institutionalsalesdepartment:(800)
998-9938or
Editor:

MikeLoukides

ProductionEditor:

ColleenGorman

CoverDesigner:

EdieFreedman

InteriorDesigner:

DavidFutato


BackCoverIllustration:

J.D."Illiad"Frazer

PrintingHistory
May1989:

FirstEdition.


June1992:

SecondEdition.

August1999:

ThirdEdition.

October2005:

FourthEdition.

NutshellHandbook,theNutshellHandbooklogo,andtheO'Reillylogoare
registeredtrademarksofO'ReillyMedia,Inc.TheInaNutshellseries
designations,UnixinaNutshell,theimageofatarsier,andrelatedtradedress
aretrademarksofO'ReillyMedia,Inc.
Manyofthedesignationsusedbymanufacturersandsellerstodistinguishtheir
productsareclaimedastrademarks.Wherethosedesignationsappearinthis
book,andO'ReillyMedia,Inc.wasawareofatrademarkclaim,thedesignations

havebeenprintedincapsorinitialcaps.UNIXisaregisteredtrademarkofThe
OpenGroup.
Whileeveryprecautionhasbeentakeninthepreparationofthisbook,the
publisherandauthorassumenoresponsibilityforerrorsoromissions,orfor
damagesresultingfromtheuseoftheinformationcontainedherein.
ISBN:0-596-10029-9
[M]


Dedication
Tomywife,Miriam.Mayourdreamscontinuetocometrue.
Tomychildren,Chana,Rivka,Nachum,andMalka.
TothememoryofFrankWillison.


Preface
ThefourtheditionofUnixinaNutshellbringsthebookintothe21stcentury.
Theterm"UNIX"isaregisteredtrademarkofTheOpenGroup.Itisusedfor
brandingsystemsascompliantwiththevariousstandardsthatcollectivelydefine
thebehaviorofamodernUnixsystem.Moreinformallythough,manysystems
inusetodayareUnixwork-alikes,eventhoughtheirsourcecodebasewas
developedindependentlyfromtheoriginalUnixsystems.
Thus,thegoalofthiseditiontopresentthebroaderstateofUnixintoday's
world.Inparticular,it'simportanttocoverboththecommercialvariants,and
thosewheresourcecodeforthesystemandtheutilitiesarefreelyavailable.To
thisend,wehavechosentocoverthesesystems,whicharerepresentativeof
"Unix"today:

Solaris10
SolarisisthemostpopularcommercialsystembasedontheoriginalUnix

SystemVcodebase.

GNU/Linux
GNU/Linuxsystemshavegainedahugefootholdinthecommercial
marketplace.Whilecurrentlyusedmostheavilyforback-endservers,
GNU/Linuxisalsostartingtogaingroundinthedesktopmarket.

MacOSX
Apple'srewriteoftheiroperatingsystemhasacorebasedonMachand
variousBSDtechnologies.ThecommandsetisderivedfromFreeBSD.
Thus,besideshavinganexcitinguserinterface,MacOSXisrepresentative


oftheBSDstrainoffreeUnix-likesystems.
ThecommandscoveredbythecurrentPOSIXstandardformthecoreofour
presentation.Eachspecificsystemhascommandsthatareuniquetoit;theseare
coveredtoo.Finally,manyimportantandusefulutilitiesaredistributedasFree
orOpenSourcesoftwareontheInternet.Wehavedoneourbesttocoverthose
aswell,includingpresentingtheInternetURLfromwhichyoucandownloadthe
sourcecode,incaseyourparticularsystemdoesn'tincludethatutilityinits
distribution.
Thiseditionhasthefollowingnewfeatures:
CoversSolaris10,thelatestversionoftheSVR4-basedoperatingsystem
fromSunMicrosystems,[*]GNU/Linux,andMacOSX.
[*]TheversionusedforthisbookwasforIntelx86-basedsystems.

Chapter2,UnixCommands,hasbeenheavilyreorganizedandrevised,in
ordertocoverthethreesystems.
Chapter3,TheUnixShell:AnOverview,hasbeenreworked,nowcovering
Bash,[*]ksh93,andtcsh.

[*]BecausetheFreeSoftwareFoundationtreats"Bash"and"Emacs"aspropernouns,wedo
too,hereandthroughoutthebook.

Chapter4,TheBashandKornShells,nowcoversthepopularBashshell,
alongwiththe1988and1993versionsofksh.Coverageofthevanilla
Bourneshellhasbeendropped.
Chapter5,tcsh:AnExtendedCShell,nowcoversthewidely-usedtcsh
shellinsteadoftheoriginalBerkeleycsh.
Chapter6,PackageManagement,isnew.Itcoverspackagemanagement
programs,whichareusedforprograminstallationonpopularGNU/Linux
systems.ItalsodescribessimilarfacilitiesforSolarisandMacOSX.
Chapter8,TheEmacsEditor,nowcoversGNUEmacsVersion21.


Chapter9,Thevi,ex,andvimEditors,nowcontainsmergedcoverageof
theviandextexteditors.Importantcommandsandfeaturesfromthe
popularvimeditorarealsoincluded.
Chapter10,ThesedEditor,nowincludescoverageofGNUsed.
ThecoverageofawkinChapter11,TheawkProgrammingLanguage,has
beenupdatedaswell,droppingseparatecoverageoftheoriginal,"old"awk.
Chapter12,SourceCodeManagement:AnOverview,whichprovidesan
introductiontosourcecodemanagementsystems,hasbeenadded.
Chapter14,TheConcurrentVersionsSystem,onCVS,hasbeenadded.
Chapter15,TheSubversionVersionControlSystem,ontheSubversion
versioncontrolsystem,isbrandnew.
Chapter16,TheGNUmakeUtility,hasbeenrevisedtofocusonGNU
Make.
Chapter17,TheGDBDebugger,ontheGDBdebugger,isbrandnew.
Astimemarcheson,once-popularornecessarycommandsfallintodisuse.Thus,
withtheexceptionofChapter18,whichdescribeshowtowriteamanualpage,

allthematerialonthevenerabletrofftextformattingsuitehasbeenremoved
fromthebook.Wehavealsoremovedthepreviousedition'smaterialonSCCS
andonobsoletecommands.


Audience
ThisbookshouldbeofinteresttoUnixusersandUnixprogrammers,aswellas
toanyone(suchasasystemadministrator)whomightofferdirectsupportto
usersandprogrammers.Thepresentationisgearedmainlytowardpeoplewho
arealreadyfamiliarwiththeUnixsystem;thatis,youknowwhatyouwantto
do,andyouevenhavesomeideahowtodoit.Youjustneedareminderabout
thedetails.Forexample,ifyouwanttoremovethethirdfieldfromadatabase,
youmightthink,"IknowIcanusethecutcommand,butwhataretheoptions?"
Inmanycases,specificexamplesareprovidedtoshowhowacommandisused.
Wehavepurposelychosentoomitsystemadministrationcommands.System
administrationisacomplicatedtopicinitsownright,andtheBibliographylists
severalgoodbooksonthisimportantsubject.
Thisreferencemightalsohelppeoplewhoarefamiliarwithsomeaspectsof
Unixbutnotwithothers.Manychaptersincludeanoverviewoftheparticular
topic.Whilethisisn'tmeanttobecomprehensive,it'susuallysufficienttoget
youstartedinunfamiliarterritory.
Finally,ifyou'renewtotheUnixoperatingsystem,andyou'refeelingbold,you
mightappreciatethisbookasaquicktourofwhatUnixhastooffer.The
"Beginner'sGuide"sectioninChapter1canpointyoutothemostuseful
commands,andyou'llfindbriefexamplesofhowtousethem,buttakenote:this
bookshouldnotbeusedinplaceofagoodbeginner'stutorialonUnix.(You
mighttryLearningtheUnixOperatingSystemforthat.)Thisreferenceshould
beasupplement,notasubstitute.(Therearereferencesthroughoutthetextto
otherrelevantO'Reillybooksthatwillhelpyoulearnthesubjectmatterunder
discussion;youmaybebetteroffdetouringtothosebooksfirst.Also,seethe

Bibliography.)


ScopeofThisBook
UnixinaNutshell,FourthEdition,isdividedintofourparts:
PartI(Chapters1through6)describesthesyntaxandoptionsforUnix
commandsandfortheBash,Korn,andtcshshells.PartIalsocovers
packagemanagement.
PartII(Chapters7through11)presentsvariouseditingtoolsanddescribes
theircommandsets(alphabeticallyandbygroup).PartIIbeginswitha
reviewofpatternmatching,includingexamplesgearedtowardspecific
editors.
PartIII(Chapters12through18)summarizestheUnixutilitiesforsoftware
developmentRCS,CVS,Subversion,makeandGDB.Italsocovers,in
brief,whatyouneedtoknowtowriteamanualpageforyourprograms.
PartIVcontainsatableofISOLatin-1charactersandequivalentvalues
(ISO8859-1(Latin-1)CharacterSet)andaBibliographyofUnixbooks.


Conventions
Thisbookfollowscertaintypographicconventions,outlinedbelow:

Constantwidth
isusedfordirectorynames,filenames,commands,programnames,
functions,andoptions.Alltermsshowninconstantwidtharetyped
literally.Itisalsousedtoshowthecontentsoffilesortheoutputfrom
commands.

Constantwidthitalic
isusedinsyntaxandcommandsummariestoshowgenerictext;these

shouldbereplacedwithuser-suppliedvalues.

Constantwidthbold
isusedinexamplestoshowtextthatshouldbetypedliterallybytheuser.

Italic
isusedtoshowgenericargumentsandoptions;theseshouldbereplaced
withuser-suppliedvalues.ItalicisalsousedtoindicateURLs,macro
packagenames,librarynames,commentsinexamples,andthefirst
mentionofterms.

%,$,#


areusedinsomeexamplesastheCshellprompt(%)andastheBash,
BourneorKornshellprompts($).#isthepromptfortherootuser.

?,>
areusedinsomeexamplesastheCshellsecondaryprompt(?)andasthe
Bash,BourneorKornshellsecondaryprompts(>).

,
areusedinsomeexamplestorepresentthespaceandtabcharacters
respectively.Thisisparticularlynecessaryfortheexamplesinthechapters
ontextediting.

program(N)
indicatesthe"manpage"forprograminsectionNoftheonlinemanual.For
example,echo(1)meanstheentryfortheechocommand.


[]
surroundoptionalelementsinadescriptionofsyntax.(Thebrackets
themselvesshouldneverbetyped.)Notethatmanycommandsshowthe
argument[files].Ifafilenameisomitted,standardinput(usuallythe
keyboard)isassumed.Endkeyboardinputwithanend-of-filecharacter.

EOF
indicatestheend-of-filecharacter(normallyCTRL-D).


^x,CTRL-x
indicatesa"controlcharacter,"typedbyholdingdowntheControlkeyand
thexkeyforanykeyx.

|
isusedinsyntaxdescriptionstoseparateitemsforwhichonlyone
alternativemaybechosenatatime.
Afinalwordaboutsyntax.Inmanycases,thespacebetweenanoptionandits
argumentcanbeomitted.Inothercases,thespacing(orlackofspacing)mustbe
followedstrictly.Forexample,-wn(nointerveningspace)mightbeinterpreted
differentlyfrom-wn.It'simportanttonoticethespacingusedinoptionsyntax.

Thisiconsignifiesatip,suggestion,orgeneralnote.

Thisiconindicatesawarningorcaution.


UsingCodeExamples
Thisbookisheretohelpyougetyourjobdone.Ingeneral,youmayusethe
codeinthisbookinyourprogramsanddocumentation.Youdonotneedto

contactusforpermissionunlessyou'rereproducingasignificantportionofthe
code.Forexample,writingaprogramthatusesseveralchunksofcodefromthis
bookdoesnotrequirepermission.SellingordistributingaCD-ROMof
examplesfromO'Reillybooksdoesrequirepermission.Answeringaquestionby
citingthisbookandquotingexamplecodedoesnotrequirepermission.
Incorporatingasignificantamountofexamplecodefromthisbookintoyour
product'sdocumentationdoesrequirepermission.
Weappreciate,butdonotrequire,attribution.Anattributionusuallyincludesthe
title,author,publisher,andISBN.Forexample:"UnixinaNutshell,Fourth
Edition,byArnoldRobbins.Copyright2005O'ReillyMedia,Inc.,0-596-100299."
Ifyoufeelyouruseofcodeexamplesfallsoutsidefairuseorthepermission
givenabove,feelfreetocontactusat


Safari®Enabled

WhenyouseeaSafari®enabledicononthecoverofyourfavorite
technologybook,thatmeansthebookisavailableonlinethroughtheO'Reilly
NetworkSafariBookshelf.
Safarioffersasolutionthat'sbetterthane-books.It'savirtuallibrarythatlets
youeasilysearchthousandsoftoptechbooks,cutandpastecodesamples,
downloadchapters,andfindquickanswerswhenyouneedthemostaccurate,
currentinformation.Tryitfreeat.


HowtoContactUs
Wehavetestedandverifiedalloftheinformationinthisbooktothebestofour
ability,butyoumayfindthatfeatureshavechanged(oreventhatwehavemade
mistakes!).Pleaseletusknowaboutanyerrorsyoufind,aswellasyour
suggestionsforfutureeditions,bywriting:

O'ReillyMedia,Inc.
1005GravensteinHighwayNorth
Sebastopol,CA95472
(800)998-9938(intheUnitedStatesorCanada)
(707)829-0515(international/local)
(707)829-0104(fax)
Youcanalsosendusmessageselectronically.Tobeputonthemailinglistor
requestacatalog,sendemailto:

Toasktechnicalquestionsorcommentonthebook,sendemailto:

Wehaveawebsiteforthebook,wherewe'lllistexamples,errata,andanyplans
forfutureeditions.Youcanaccessthispageat:
/>

Acknowledgments
ThanksagaintoYosefGoldforsharinghisofficewithme.DebCameronagain
revisedChapter8.ThankstoMikeLoukidesatO'ReillyMediaforhisworkas
editor.ChuckToporek,alsoofO'ReillyMedia,answerednumerousMacOSX
andMacintosh-relatedquestions,forwhichI'mgrateful.J.D."Illiad"Frazerof
UserFriendly(seeprovidedthegreatcartoonon
thebackcover.It'sarelieftofinallyknowthetarsier'sname.
ThankstoJenniferVespermanforpermissiontoadaptmaterialfromEssential
CVSforChapter14.Similarly,BenCollins-Sussman,BrianW.Fitzpatrick,and
C.MichaelPilatogavepermissionformetoadaptmaterialfromVersionControl
withSubversionforChapter15,whichIgreatlyappreciate.AndthankstoAndy
Oram,EllenSiever,StephenFigginsandAaronWeberformakingavailable
materialfromLinuxinaNutshellforuseinpartsofthebook.
ThankstoDavidG.Korn(AT&TResearch)andChetRamey(CaseWestern
ReserveUniversity)foransweringmyquestionsabouttheKornshellandBash.

KeithBosticofSleepycatSoftwareansweredseveralquestionsaboutBerkeley
DB.GlennBarryofSunMicrosystemshelpedoutontheSolarisside.
Thankstothefollowingpeople,inalphabeticalorder,forreviewingthebook
duringitsvariousstages:NelsonH.F.Beebe(UniversityofUtahMathematics
Department),JonForrest(UniversityofCalifornia,Berkeley,Civiland
EnvironmentalEngineering),andBrianKernighan(PrincetonUniversity
ComputerScienceDepartment).ChetRamey,co-authorandmaintainerofBash,
reviewedChapter4,andBramMoolenaar,theauthorofvim,reviewedChapter
9,forwhichIthankthem.
AspecialthankstoDr.UriDegen,LevOrpaz,JulioKadichevski,andSid
GordonofNessTechnologies,andtoMikeHendricksonandMikeLoukidesof
O'ReillyMedia,forenablingmetofinishthiseditioninatimelyfashion.
Onceagain,thankstomywifeMiriamforherlove,patience,andsupport,andto
mychildrenfornotgivingMommy(toomuch)hasslewhileIwasworking.


NofAyalon
ISRAEL
ArnoldRobbins


PartI:CommandsandShells
PartIpresentsasummaryofUnixcommandsofinteresttousersand
programmers.ItalsodescribesthemajorUnixshells,includingspecial
syntaxandbuilt-incommands.Itroundsoffwithanoverviewofpackage
managementsoftware.
Chapter1,Introduction
Chapter2,UnixCommands
Chapter3,TheUnixShell:AnOverview
Chapter4,TheBashandKornShells

Chapter5,tcsh:AnExtendedCShell
Chapter6,PackageManagement


Chapter1.Introduction
TheUnixoperatingsystemoriginatedatAT&TBellLabsintheearly1970s.
SystemVRelease4(SVR4)camefromUSL(UnixSystemLaboratories)inthe
late1980s.UnixsourceownershipiscurrentlyamatteroflitigationinU.S.
courts.BecauseUnixwasabletorunondifferenthardwarefromdifferent
vendors,developerswereencouragedtomodifyUnixanddistributeitastheir
ownvalue-addedversion.SeparateUnixtraditionsevolvedasaresult:USL's
SystemV,theBerkeleySoftwareDistribution(BSD,fromtheUniversityof
California,Berkeley),Xenix,etc.
SVR4,whichwasdevelopedjointlybyUSL(thenadivisionofAT&T)andSun
Microsystems,mergedfeaturesfromBSDandSVR3.Thisaddedabouttwo
dozenBSDcommands(plussomenewSVR4commands)tothebasicUnix
commandset.Inaddition,SVR4providedaBSDCompatibilityPackage,akind
of"secondstring"commandgroup.Thispackageincludedsomeofthemost
fundamentalBSDcommands,anditspurposewastohelpusersofBSD-derived
systemsmakethetransitiontoSVR4.


×