电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

UNIX操作系统基础VIP免费

UNIX操作系统基础_第1页
1/11
UNIX操作系统基础_第2页
2/11
UNIX操作系统基础_第3页
3/11
Linux操作系统基础教程提到Linux操作系统,就不能不提UNIX和GNU。UNIX是由AT&TBell实验室于1969年开发的多用户、多任务操作系统,是目前广泛使用的商业操作系统。而GNU则开始于1984年,RichardStallman发起的GNU计划,目的是为了创建一套完全自由的操作系统(《GNU宣言》)。GNU是“GNU’sNotUnix”的递归缩写。(通用公共许可GNUGeneralPublicLicense,GPL,反版权copyleft,自由软件基金会FreeSoftwareFoundation,FSF)。1991年,LinusTorvalds编写了与UNIX兼容的LINUX操作系统并在GPL条款下发布。1992年,Linux与其他GNU软件结合,产生了完全自由的操作系统,所以Linux操作系统又被称为“GNU/Linux”。三大主流shell查看文件/etc/shell,可列出操作系统所包含的shellBourneshell——也称sh,是Version7Unix默认的UnixShell。BourneAgainShell——多数Linux操作系统的默认shell,是Bourneshell(UCBerleley)的扩展,是Bourneagain/Bornagainshell的双关语,1987年由BrianFox创造。Cshell,TCshell——模仿C的语法,开发与BSD系统,脱胎于第六版UNIX的/bin/sh,也是Bourneshell的前身,加入了alias,commandhistory等功能。Kornshell是第一个UNIXshell,它完全向上兼容Bourneshell并包含了许多Cshell的特性。查看用户的默认shell,请查看文件/etc/passwd每个进程都有一个进程号pid,可用pstree或者ps–ef命令查看1.常用Linux命令(1)uname(2)ls(3)ps(4)date(5)who(6)pwd(7)mkdir(8)rmdir(9)rm(10)touch(11)id(12)group(13)su(14)which(15)where2.CShell1.shbangline#!/bin/csh或者#!/bin/tcsh2.comments#thisiscommentline3.wildcards4.5.localvariablessetvariable=valuesettom=”tom”6.globalvariablessetenvvariablevaluesetenvtomtom7.extractthevariablevalueecho$variable_nameecho$nameecho$PRINTER8.userinputecho“whatisyourname?”setname=$<9.argumentsscriptnamearg1arg2arg3echo$1,$2,$3echo$*10.arrayssetword_list=(word1,word2word3)echo$world_list[2]echo$word_listecho$word_list[*]11.commandsubstitutiona)Setvariable_name=`command`b)Echo$variable_name12.arithmetic@n=5+5echo$n13.operatorsLogicsign:==,!=,>,>=,<,<=,&&,||,!14.conditionalstatementsa)Loopsb)Filetesting–rfilereadablebycurrentuser-wfilewritablebycurrentuser-xfileexecutablebycurrentuser-efileexists-ofileownedbycurrentuser-zfileiszerolength?-dfileisdirectory?-ffileisaplainfile3.Bourneshell1.theshbangline#!/bin/sh2.comments#thistextisnot#interpretedbytheshell3.wildcards*,?,4.displayingoutputecho“Whatisyourname?”5.localvariablesvariable_name=valuename=”MaoyingWoo”x=56.GlobalvariablesVARIABLE_NAME=valueexportVARIABLE_NAME7.extractingecho$variable_name8.readinguserinputecho“whatisyourname?”a)readnameb)readname1name2name39.argumentsa)scriptnamearg1arg2arg3b)echo$1$2$310.arrayssetword1word2word3echo$1$2$311.commandsubstitution``12.arithmeticn=`expr5+5`echo$n13.operators字符串运算:=,!=string数值运算:-e,-n逻辑运算:-a,-o,!关系运算:-gt,-ge,-lt,-le14.conditionalstatementssimilartocsh4.KornShell(KShell)1.shbangline#!/bin/ksh2.comments#thisprogramwilltestsomefiles3.wildcardsrm*;ls??;catfile[1-3];echo“Howareyou?”4.displayingoutputecho“whoareyou?”print“howareyou?”5.localvariablesvariable_name=valuetypesetvariable_name=valuee.g.,name=”JohnDoe”6.globalvariableexport$VARIABLE_NAME=valueexportPATH=/bin:/usr/bin:.7.extractingvaluesfromvariablenameecho$variable_nameechoname8.readinguserinputprint–n“Whatisyourname?”readname9.argumentsscriptnamearg1arg2arg3echo$1$2$310.arrayssetapplespearspeachesprint$1$2$311.arithmetictypeset–ivariable_name整型变量的设置12.commandsubstitutionvariable_name=`command`variable_name=$(co...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

UNIX操作系统基础

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部