欢迎来到天天文库
浏览记录
ID:15167274
大小:98.00 KB
页数:18页
时间:2018-08-01
《unix指令汇总(英文版)》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、UnixCommandSummarySeetheUnix tutorial foraleisurely,self-pacedintroductiononhowtousethecommandslistedbelow.Formoredocumentationonacommand,consultagoodbook,orusethemanpages.Forexample,formoreinformationon grep,usethecommand mangrep.Contents·cat ---forcreatingandd
2、isplayingshortfiles·chmod ---changepermissions·cd ---changedirectory·cp ---forcopyingfiles·date ---displaydate·echo ---echoargument·ftp ---connecttoaremotemachinetodownloadoruploadfiles·grep ---searchfile·head ---displayfirstpartoffile·ls ---seewhatfilesyouhave·
3、lpr ---standardprintcommand(seealso print )·more ---usetoreadfiles·mkdir ---createdirectory·mv ---formovingandrenamingfiles·ncftp ---especiallygoodfordownloadingfilesviaanonymous ftp.·print ---customprintcommand(seealso lpr )·pwd ---findoutwhatdirectoryyouarein·
4、rm ---removeafile·rmdir ---removedirectory·rsh ---remoteshell·setenv ---setanenvironmentvariable·sort ---sortfile·tail ---displaylastpartoffile·tar ---createanarchive,addorextractfiles·telnet ---logintoanothermachine·wc ---countcharacters,words,linescatThisisone
5、ofthemostflexibleUnixcommands.Wecanusetocreate,viewandconcatenatefiles.Forourfirstexamplewecreateathree-itemEnglish-Spanishdictionaryinafilecalled"dict."%cat>dictredrojogreenverdeblueazul%standsfor"holdthecontrolkeydown,thentap'd'".Thesymbo
6、l > tellsthecomputerthatwhatistypedistobeput into thefile dict.Toviewafileweuse cat inadifferentway:%catdictredrojogreenverdeblueazul%Ifwewishtoaddtexttoanexistingfilewedothis:%cat>>dictwhiteblancoblacknegro%Nowsupposethatwehaveanotherfile tmp thatloo
7、kslikethis:%cattmpcatgatodogperro%Thenwecanjoin dict and tmp likethis:%catdicttmp>dict2Wecouldcheckthenumberoflinesinthenewfilelikethis:%wc-ldict28Thecommand wc countsthings---thenumberofcharacters,words,andlineinafile.chmodThiscommandisusedtochangethepermission
8、sofafileordirectory.Forexampletomakeafile essay.001 readablebyeveryone,wedothis:%chmoda+ressay.001Tomakeafile,e.g.,ashellscript mycommand executable,wedothis%chmod+xm
此文档下载收益归作者所有