G03 unix command & c-shell

上传人:guoc****ang 文档编号:243140507 上传时间:2024-09-16 格式:PPT 页数:39 大小:220KB
返回 下载 相关 举报
G03 unix command & c-shell_第1页
第1页 / 共39页
G03 unix command & c-shell_第2页
第2页 / 共39页
G03 unix command & c-shell_第3页
第3页 / 共39页
点击查看更多>>
资源描述
Click to edit Master title style,Click to edit Master text styles,Second level,Third level,Fourth level,Fifth level,*,Unix Command,Philosophy Liu,Unix Command,cat,顯示檔案內容,more,顯示檔案內容 (整頁模式),# cat /etc/hosts,# .,192.168.41.2,xpert,192.168.41.1 rout1,Unix Command,pwd,顯示目前所在目錄(路徑),cd,directory ,更換,目錄,#,pwd,/users/image,#,cd,/id/,workfile,#,pwd,/id/,workfile,Unix Command,ls,列出檔案清單,#,ls,/id (,只列出檔名 ),#,ls,l (,列出詳細檔案訊息 ),ll,#,ls,a (,列出隱藏檔檔名 ),users,imgae, cam, genesis,cim,aoi,lp7008,-,rw,-,rw,-,rw,1 image users 124 Feb 10 200 09:28 auto_panel,權限 擁有者 群組 大小 日期及時間 檔名,Unix Command,chmod,變更權限 (,r= 4 w= 2 x= 1),三類基本權限 : 1. 擁有者 2. 群組 3.其他,ls,-l /id/scripts/auto_panel,-,rw,-,rw,-,rw,-1 image users 4 Feb 10200 09:28 auto_panel,chmod,+x /id/scripts/auto_panel,ls,-l /id/scripts/auto_panel,-,rwxrwxrwx,1 image users 4 Feb 10200 09:28 auto_panel,chmod,751 /id/scripts/auto_panel,ls,-l /id/scripts/auto_panel,-,rwxr,-x-x1 image users 4 Feb 10200 09:28 auto_panel,Unix Command,chown,變更,擁有者 (及群組 ),ls,-l /id/scripts/auto_panel,-r-r-r- 1,acn,users Feb 10 200 09:28 auto_panel,chown,image /id/scripts/auto_panel,ls,-l /id/scripts/auto_panel,-r-r-r- 1 image users Feb 10200 09:28 auto_panel,#,chmod,image:,usr,/id/scripts/auto_panel,-r-r-r- 1 image,usr,Feb 10200 09:28 auto_panel,Unix Command,cp,複製檔案,cp -r,複製檔案及目錄,cp /id/scripts/auto_panel /,abc,/,tmp,cp -r /id/scripts /,abc,/,tmp,Unix Command,date,顯示 (或變更) 時間及日期,date,Mon Feb 10 13:45:07 EAT 1997,date 08311030,月日時分 07151055,- yes,( stop - change -reboot ),Unix Command,du,分析目錄大小,df,分析硬碟 (區分) 大小,bdf,分析硬碟 (區分) 大小 (,xpert,only),cd,/id,du,-s,604892 .( the /id directory is about 300 Mbytes),#,cd,/,#,du,s ,1020203 . . . . /,etc,202002 . . . . /,home,Unix Command,find,尋找某檔案或目錄,find / -name,csh,-print,#,find / -name core -exec,rm, ;,Unix Command,grep,截取某輸出行,cat,/etc/hosts,grep,”xpert1“,#cat /id/scripts/auto_panel |,grep,v “echo”,命令,A |,命令,B,將命令,A,之輸出送給,B,做輸入,Unix Command,ps,偵測執行中程式,kill,中斷執行中程式,ps,-,ef,grep,auto_panel,image 1209 1 0 12:35:13 ?0:00 /id/scripts/auto_panel,kill -9 1209,#,ps,-,ef,grep,auto_panel,Unix Command,man,指令詳細說明,# man,chmod,Unix Command,mkdir,建立新目錄,#,mkdir,/id/,abc,#,ls,l /id,dr,-r-r- 1 root users Feb 10200 09:28,abc,Unix Command,mv,搬移 (更名) 檔案或目錄,#,mv,/,tmp,/,abc,/,tmp,/,abcd,#,ls,/id/,workfile,abc,Unix Command,r m,刪除檔案或目錄,#,pwd, /id,#,rm abc,#,rm,-r /,tmp,/123,Unix Command,tar,整合備份,cd,/id ( /id/scripts ),tar,cvf,/,tmp,/script .tar scripts,將 /,id,下,script,整合備份至 /,tmp,/script.tar,cd,/,mydir,tar,xvf,/,tmp,/script.tar (, /,mydir,/scripts/.,),將整合備份 /,tmp,/script.tar,還原至 /,mydir,中,Unix Command,gzip,(,解) 壓縮,pwd,gzip,/id/,workfile,/file, file.,gz,gzip,-d /id/,workfile,/file.,gz,Unix Command,compress (,解) 壓縮,compress /id/,workfile,/file, file.Z,uncompress /id/,workfile,/file.Z,Unix Command,touch,產生新的空檔案,# touch file,Unix Command,mount,檢查已掛上之硬碟 (含遠端),# mount,mount,手動掛上硬碟 (含遠端),# mount /dev/,dsk,/c1t4d0 /optical,Unix Command,fsck,檢修受損之硬碟 (區分),#,fsck,-y /dev/,rdsk,/c0t0d0,#,fsck,-y,省略時待表主硬碟,(,於開機異常時使用, 一般在使用後按,Ctrl-D,可使系統繼續開啟完成),Unix Command,ping,檢查與臨機之網路連通狀況,# ping 192.168.41.238 (,xpert,),( 1. ping a hostname ),( 2. cat /etc/hosts,),Unix Command,ioscan,檢查,I/O,連接狀況,#,ioscan,f (HP),Unix Command,正常關機,# shut (,Xpert,作業下,),# reboot h (,關機),# reboot (,重開,),# shutdown h 0,# init 5 (SUN),(*,關機完畢後, 請務必靜待數分鐘, 再開啟電源.),C-Shell Command,C-Shell Command,# & #!,#,comment,#!/,usr,/bin/,csh,- C-shell,envirnment,C-Shell Command,set,set,var,= value,set list = (l1 l2 l3 l4,smc,drill),echo $#list, 6 0,set,var,= ,command, cat /,tmp,/f1,set,var,= $ full_path_name,echo $#list ,full_path_name (old; append),C-Shell Command,整數運算,int,= 5, num = $,int,+ 1 5 + 1, num = $,int,* 25 5x25, num = $,in,t,/ 6, num = $,int,% 6,C-Shell Command,(1) ( ; ) (2) !,(3) * ; % ; / (4) + ; ,(5) ; =,(6) = = ; ! = ; = ; ! ,| | ; & &,或 且,C-Shell Command,goto,mand2.,START:,.,command21,mand25,mand3.,if ($,passw,!= 5000),goto,START,C-Shell Command,if . then. else .,endif,if ( $a 10) then, command1.,endif,.command3,if ($a 10) then,. command1.,else,. command2.,endif,.command3,C-Shell Command,while end, a = 0,while ($a 10),. command 1 .,. command 2.,. command 3. a = 0, a + a = $a + 1 1, 2, 3, 4,.,end,C-Shell Command,foreach,end,set list = (l1 l2 l3 l4,smc,drill),foreach,LAYER,( $list ),echo $LAYER,end,C-Shell Command,switch.case,endsw,set,abc,= $ 2,switch ( $,abc,),case “2”:,command1.,breaksw,case “4”:,command2.,breaksw,case “6”:,command3.,breaksw,default:,command3.,endsw,C-Shell Command,bc,bc bc,scale=6 if (3.4 2) 1” |,bc,set k = echo “if ( $size 12.5)2” |,bc,if (3.42) then,if ($#k = 1) then,command.,.command.,endif,endif,./test,
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 图纸专区 > 小学资料


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!