欢迎来到天天文库
浏览记录
ID:20028565
大小:1.21 MB
页数:62页
时间:2018-10-09
《unix basics(the unix file system)课件》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、Lecture2UNIXBasicsTheUNIXFilesystemOnthelastepisodeofOpenSourceTools…CourseInfoHistoryofUNIXandOpenSourceHighlightsofUNIXTheUNIXPhilosophySystemorganizationUnixSystemStructureusershellandutilitieskernelhardwarecprogramsscriptslsshgccfindopen()fork()exec()KernelSubsystemsFilesystemDealswith
2、allinputandoutputIncludesfilesandterminalsIntegrationofstoragedevicesProcessmanagementDealswithprogramsandprograminteractionHowprocessesshareCPU,memoryandsignalsSchedulingInterprocessCommunicationMemorymanagementUNIXvariantshavedifferentimplementationsofdifferentsubsystems.Whatisashell?Theuseri
3、nterfacetotheoperatingsystemFunctionality:ExecuteotherprogramsManagefilesManageprocessesAprogramlikeanyotherExecutedwhenyoulogonMostCommonlyUsedShells/bin/shTheBourneShell/POSIXshell/bin/cshCshell/bin/tcshEnhancedCShell/bin/kshKornshell/bin/bashOpenSourcekshcloneBasicformofshell:while(readcomma
4、nd){parsecommandexecutecommand}ShellInteractiveUseWhenyoulogin,youinteractivelyusetheshell:CommandhistoryCommandlineeditingFileexpansion(tabcompletion)CommandexpansionKeybindingsSpellingcorrectionJobcontrolShellScriptingAsetofshellcommandsthatconstituteanexecutableprogramAshellscriptisaregul
5、artextfilethatcontainsshellorUNIXcommandsVeryusefulforautomatingrepetitivetaskandadministrativetoolsandforstoringcommandsforlaterexecutionSimpleCommandssimplecommand:sequenceofnonblanksargumentsseparatedbyblanksortabs.1stargument(numberedzero)usuallyspecifiesthenameofthecommandtobeexecuted.Anyr
6、emainingarguments:Arepassedasargumentstothatcommand.Argumentsmaybefilenames,pathnames,directoriesorspecialoptions(uptocommand)SpecialcharactersareinterpretedbyshellAsimpleexampleExecuteabasiccommandParsingacommandintoargumentsiscalledsplitting$ls–l/bin-rwxr-xr-x1rootsys43234Sep102008date$prompt
7、commandargumentsTypesofArgumentsOptions/FlagsConvention:-Xor--longnameParametersMaybefiles,maybestringsDependsoncommand$tar–c–v–farchive.tarmain.cmain.hGettingHelponUNIXman:displayentriesfromUNIXonlinedocumentationwhatis,aproposMa
此文档下载收益归作者所有