Unix操作系统命令.pdf
《Unix操作系统命令.pdf》由会员分享,可在线阅读,更多相关《Unix操作系统命令.pdf(75页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、Unix 操作系统命令操作系统命令UNIX操作系统(第五版)操作系统(第五版)Jerry Peek,Grace Todino&John Strang 著 龚志翔著 龚志翔等译等译2003年年1月出版月出版书号:书号:7-111-10164-2页数页数:188定价:定价:26.00元元Reference BookLog in and out of a Solaris systemNavigate the Solaris file systemCreate files and directories,and change their permissionsManipulate text files
2、,and use the vi text editorUse commands to search directories and filesUse basic network commandsIdentify and modify initialization filesCourse ObjectivesReleaseSunOS SolarisHP-UXAIX WindowsRedhat Linuxdate version versionversionversion versionversion19831119851198611987219894.0.2319904.1.31.1A 1991
3、19925293.11993419945.42.4Halloween 19951095,NT2.019965.5.12.5.110.24.219975.62.6114.35.019985.774.3.1 9819996.0,6.120005.8811i 5L Me,20007.020025.995L(5.2)XP8.0Release sunOSSolaris HP-UX AIX Windows Redhat LinuxDate version versionversionversionversionversionHalloweenUnix Version HistoryWhat can it
4、do?Server:Web server,Mail server,Database Server,Program DevelopmentWho should know Unix?Unix administrator,Oracle Administrator,Network Engineer Program DeveloperMore about UnixInput devicesOutput devicesHardwareOperating System vs.Application SoftwareClient vs.ServerSoftwareSolaris OS?Kernel?Shell
5、?File SystemHardwareKernelShellCPUOthersMacUnixLinuxWindowsSUN,IBM,HP,SGI,FreeBSD,DEC,SCORedHat,SuSE,SlackWare,红旗红旗NT,98,2000,XPUNIX 和其他操作系统比较和其他操作系统比较Manages devices,memory,and processesControls the functions between the system programs/utilities and the system hardwareManages swap space,daemons,fi
6、le systems,and other functionsKernelA shell is an interface between the user and the kernel,which acts as an interpreter or translatorThree shells are available in the Solaris environment:Bourne shell (sh)Korn shell (ksh)C shell (csh)Bourne-again shell (bash)ShellWritten by Stephen Bourne for AT&T U
7、nixThe earliest and best-known Unix shellCommon denominator of most shell scriptingBourne-Again Shell(bash)#root$userBourne Shell(sh)Created as part of BSD Unix by Bill Joy,the author of vi,at the University of California at BerkeleyIntroduced command-line history and a programming environment simil
8、ar to the C programming languageNot compatible with Bourne shell syntaxtcsh,an enhanced but totally compatible csh#root%userC Shell(csh)A hierarchy of directories,subdirectories,and files grouped together for a specific purpose.Directory A location for other files and directories.The directory struc
9、ture enables you to create files and directories accessed through a hierarchy of directories.Subdirectory Any directory below another directory.For example,some of the subdirectories under the/directory are/usr,/etc,and/kernel.The File SystemA pathname uniquely identifies a particular file or direct
10、ory byspecifying its locationA slash(/)between each directory name in the path to indicate different directories A slash in the first position represents the/directoryAbsolute Pathname Specifies a file or directory in relation to the/directory Begin with a slashRelative Pathname Specifies a file in
11、relation to the current working directory Do not begin with a slashPathnames$Command option(s)argumentsA space must be used as a delimiter between each part of the command lineUp to 256 characters can be entered on a single command lineDifferent from DOS Case sensitive Different command prompt:/Comm
12、and-Line SyntaxClear the terminal screenclearclearDisplay the absolute pathname of the current directory(print working directory)pwdpwdChange DirectoriesAccept both absolute and relative pathnamesCurrent directory.Parent directory.cd directory_namecd/export/home/jerrycd jerry/dir1cdcd./.cdDisplaying
13、 a Listing of Files and Directories ls aDisplaying hidden filesHidden file:a file started with a“.”ls RDisplaying a recursive listing ls tSorts by time stamp instead of by name ls lDisplaying a long listd rwx r-x r-x 4 user nobody 1024 Feb 22 09:20 a.txt文 拥 同 其链拥拥大最后一次文文 拥 同 其链拥拥大最后一次文件 有 组 它接有有小修改时
14、间件件 有 组 它接有有小修改时间件类 者 人 人号者组名类 者 人 人号者组名型 权 权 权型 权 权 权限 限 限限 限 限lsd directory-normal filefile filename(s)Text,including ASCII text,English text,commands text and executable scripts Executable or Binary,including 32-bit executable and extensible linking format(ELF)code files and other dynamically lin
15、ked executables Data,those created by an application running on the systemls FDisplaying file types目录文件/目录文件/可执行文件*可执行文件*文本文件文本文件(none)File Typer-读权限读权限w-写权限,对目录来说,可生成文件与子目录或删除文件与子目录写权限,对目录来说,可生成文件与子目录或删除文件与子目录x-执行权限,对目录来说,可查找该目录下内容执行权限,对目录来说,可查找该目录下内容-没有权限没有权限如如-rw-r-r拥 同 其拥 同 其有 组 它有 组 它者 人 人者 人 人
16、其中 拥有者-生成文件时登录的人,权限最高,u表示其中 拥有者-生成文件时登录的人,权限最高,u表示同组人-系统管理员分配的同组的一个或几个人,g表示同组人-系统管理员分配的同组的一个或几个人,g表示其它人-除拥有者,同组人外的人,o表示其它人-除拥有者,同组人外的人,o表示所有人-包括拥有者、同组人及其它人,a表示所有人-包括拥有者、同组人及其它人,a表示File PermissionChange permissionsSymbolic mode uses combinations of letters and symbolschmod g-r file1chmod u+x,go+r fil
17、e1chmod a=rw file1chmodchmod mode filenamewho cp permission(s)r Readw Writex Execute=Set permissions-Remove access+Give accessu User or owner of the fileg Group to which the file belongso Others outside owner and groupa All of the aboveOctal mode uses octal numberschmod 555 dantechmod 644 dantechmod
18、 755 danteOctal Value Permissions4 Read2 Write1 ExecuteOctal Value Permissions7 r w x6 r w -5 r -x4 r -3 -w x2 -w -1 -x0 -Create new,empty files or update access and modification timestouch filename(s)touchCreate directories using either an absolute or a relative pathnameMust have the appropriate pe
19、rmissions to create a directorymkdir-p directory_namemkdir dir1/dir2mkdir dir3 dir4 dir5mkdir/gamesmkdir-p dir6/dir7/dir8mkdirCopy filescp-i source_file destination_filecp-i source_file(s)destination_directorycp beans applecp beans apple dir2cp i beans appleCopy a directory and its contents to anoth
20、er directorycp-ri source_directory(s)destination_directorycp-r dir3 dir4cp-r dir3 dir4/tmpcpMove or rename files and directoriesmv-i source target_filemv-i source target_directorymv nuts beansmv/export/home/jerry/brands mv dir5 dir6mvRemove filesrm-i filename(s)rm file1 file2 file3rm-i file4Removing
21、 Directoriesrmdir directory_name(s)rm-ri directory_name(s)rmdir empty_dirrm r dir6rm ir/dir7rm&rmdirCreate alternate names or aliases for files and directories symbolic(or soft)linksln-s source_file target_filelnSymbolic links link a file or directory across file systemsLink 1file2Data blocksData bl
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Unix 操作系统 命令
限制150内