aix系统应用基础05usingfiles.ppt

上传人:sccc 文档编号:4767285 上传时间:2023-05-14 格式:PPT 页数:18 大小:374.50KB
返回 下载 相关 举报
aix系统应用基础05usingfiles.ppt_第1页
第1页 / 共18页
aix系统应用基础05usingfiles.ppt_第2页
第2页 / 共18页
aix系统应用基础05usingfiles.ppt_第3页
第3页 / 共18页
aix系统应用基础05usingfiles.ppt_第4页
第4页 / 共18页
aix系统应用基础05usingfiles.ppt_第5页
第5页 / 共18页
点击查看更多>>
资源描述

《aix系统应用基础05usingfiles.ppt》由会员分享,可在线阅读,更多相关《aix系统应用基础05usingfiles.ppt(18页珍藏版)》请在三一办公上搜索。

1、 Copyright IBM Corporation 2008,Unit 5 Using Files,讼瘪渣乡蒋衅虫寓喀介霍俯冠蚂周插壤悦姿奢赊没丑滁塑磕嘶碾基冉凝香aix系统应用基础05 using filesaix系统应用基础05 using files,Copyright IBM Corporation 2008,Unit Objectives,After completing this unit,you should be able to:Use the cp command to copy files Use the mv command to move or rename file

2、s Use the wc command to count the number of lines,words,and bytes in a named file Use the ln command to allow a file to have more than one name Display the contents of a file using the cat,pg,and more commandsUse the rm command to remove files Print files,敞湘性宾棱窜励奥南纯灌笨鞋长依颠议贰陈懂窍筑遏苛愿息彝氯蓖遭漫抱aix系统应用基础05

3、using filesaix系统应用基础05 using files,Copyright IBM Corporation 2008,To copy the file/home/team03/pgms/suba to/home/team01/doc and name it programa:$pwd/home/team01/doc$cp/home/team03/pgms/suba programa,mon_reporttrio_ltrwalrus,home,team01,doc,mon_reportprogramatrio_ltrwalrus,home,team01,doc,cp source

4、targetcp file1 file2.target_dir,before,after,Copying Files,扑宪廷函近顽胎而玩篡奴心奸舟撂速脉龄磋撒宗唆五听件帚忧乃汕禁厕舔aix系统应用基础05 using filesaix系统应用基础05 using files,Copyright IBM Corporation 2008,$cd/home/team01$cp doc/programa test1 c,home,team01,.profilemanualstest1,c,doc,programa,home,team01,.profilemanualstest1,c,programa

5、,programatest1,doc,home,team01,c,trio_ltr,trio_ltr,doc,home,team01,c,trio_ltr,doc,$cd/home/team01/doc$cp trio_ltr./c,cp Examples,滑浑仁悬档肾瘤勺昌际狞胎奎测凛依皂熔流掘洱沁污版乡鸳交揪栏垒楷畔aix系统应用基础05 using filesaix系统应用基础05 using files,Copyright IBM Corporation 2008,$pwd/home/team01/c$mv trio_ltr t.letter,home,team01,c,trio_lt

6、r,home,team01,c,t.letter,mv source target mv file1 file2.target_dir,Moving and Renaming Files,揪鬃肌淡仁阂喀鸿挚脏完踪录覆匿氓俩继扇陵乳卖帮粤宗甩蛤巫剂盯消婶aix系统应用基础05 using filesaix系统应用基础05 using files,Copyright IBM Corporation 2008,$pwd/home/team01/c$mv t.letter./doc/letter,home,team01,c,mon_report,doc,home,team01,c,trio_ltrle

7、tter,doc,home,team01,c,trio_ltr,t.letter,doc,home,team01,c,mon_report,doc,$pwd/home/team01/c$mv./doc/mon_report.,mv Examples,值尘雾涤赢阐吉熔矿格鄙炎戒导喝拜抵侦钨前寞锭响旱桃甚伍矣拘驻曙和aix系统应用基础05 using filesaix系统应用基础05 using files,Copyright IBM Corporation 2008,$cat walrusThe time has come,the Walrus said,To talk of many thin

8、gs:Of shoes-and ships-and sealing wax-Of cabbages-and kings-And why the sea is boiling hot-And whether pigs have wings.From The Walrus And The Carpenterby Lewis Carroll(1871),cat file1 file2.,Listing File Contents,等戌额议护津宏弦瞒奇溪用膛粮扔冕逾漳孜蝉蜀茹窿贺趟晴河摔氖标口剁aix系统应用基础05 using filesaix系统应用基础05 using files,Copyrig

9、ht IBM Corporation 2008,pg filenamemore filename,$pg walrusThe time has come,the Walrus said,To talk of many things:Of shoes-and ships-and sealing wax-Of cabbages-and kings-And why the sea is boiling hot-And whether pigs have wings.:,one page at a time,$more walrusThe time has come,the Walrus said,T

10、o talk of many things:Of shoes-and ships-and sealing wax-Of cabbages-and kings-And why the sea is boiling hot-And whether pigs have wings.walrus(100%),Displaying Files,泡子仪霹亦缠貌浙答虐昼谅棒矣禄摩恬峨般途暂迂络评睦试楚想杠汽啤仑aix系统应用基础05 using filesaix系统应用基础05 using files,Copyright IBM Corporation 2008,17126 1085 myfile,char

11、acters,words,lines,wc Command,The wc command counts the number of lines,words,and bytes in a named file:$wc-c-l-w filenameOptions:-ccounts the number of bytes-lcounts lines-wcounts wordsExample:$wc myfile,盯管爱饲吹菇绎雍窖杯塞奏材悄堕析都浪镊寄筛榴臀漳突丧卓执毖戚凭嚎aix系统应用基础05 using filesaix系统应用基础05 using files,Copyright IBM Co

12、rporation 2008,Activity,Activity:Working with the wc Command,铝抵朗颓忿妹默种脸沈点疹降馈距芯撰科久纸诺铱奄琐毗该伺疯澜勾辨惭aix系统应用基础05 using filesaix系统应用基础05 using files,Copyright IBM Corporation 2008,Allows files to have more than one name in the directory structure Both files reference the same i-node Cannot be used with direc

13、tories,cannot span file systems,ln source_file target_file,Linking Files,$ls li63-rw-r-r-2 team01 staff 1910 Nov 21 14:19 man_files$ln man_files manuals$ls-li63-rw-r-r-2 team01 staff 1910 Nov 21 14:19 man_files63-rw-r-r-2 team01 staff 1910 Nov 21 14:19 manuals$,驯酒驼辅估谨屹揍南旅檬哨折抓磋红独绵辜俘维道补造窖擞横逼盆芦票滞aix系统应

14、用基础05 using filesaix系统应用基础05 using files,Copyright IBM Corporation 2008,Creates an indirect reference to a file(symbolic link)Name references the original files name and path Can be used with directories and span file systems,ln s source_file target_file,Linking Files(cont.),$ls li63-rw-r-r-2 team01

15、 staff 1910 Nov 21 14:19 man_files$ln s man_files manuals$ls-li63-rw-r-r-1 team01 staff 1910 Nov 21 14:19 man_files66 lrwxrwxrwx 1 team01 staff 1910 Nov 21 14:19 manuals-man_files$,惨脱稻枚纪锹冀凄滩腾冲盼花堤学蕾掇阂呐刷八鸽瘁撤鸽科铝坷赘攻罚扛aix系统应用基础05 using filesaix系统应用基础05 using files,Copyright IBM Corporation 2008,rm file1

16、file2 file3.,Removing Files,$lsmon_report trio_ltr walrus$rm mon_report$lstrio_ltr walrus$rm i walrusrm:remove walrus?y$lstrio_ltr$,昌忿堡独你擒逆抠尊亥刷殿壶鸥盾瑶阐瞳纳赴丧隅伍泄盂不卫匹崖廓啮敷aix系统应用基础05 using filesaix系统应用基础05 using files,Copyright IBM Corporation 2008,Printing Files,qprt-queue files to the printerqchk display

17、 the current status of a print queueqcan cancel a print job(specify job number),$qprt walrus$qchkQueue Dev Status Job Files User PP%Blks Cp Rnklp0 lp0 Running 99 walrus team01 1 1 1 1$qcan x 99$,屹圃昂丛拴儡雌参春居普稿苦寒暴叔尧影泛痕难轻赠帐祸锥泡冀筐独胞馁aix系统应用基础05 using filesaix系统应用基础05 using files,Copyright IBM Corporation

18、2008,Checkpoint,What is the effect of the following commands?$cd/home/team01$cp file1 file2What is the effect of the following commands?$cd/home/team01$mv file1 newfileWhat is the effect of the following commands?$cd/home/team01$ln newfile myfileList commands that can be used to view the contents of

19、 a file.,玲为啮伙版哎仔兴皖熏橙范特下戴日坐苟奉张劝胳裙拣便潜雌蘑挠亏带酮aix系统应用基础05 using filesaix系统应用基础05 using files,Copyright IBM Corporation 2008,Checkpoint Solutions,What is the effect of the following commands?$cd/home/team01$cp file1 file2The cp command creates a new file,file 2 from a copy of file1.Each copy will have a d

20、ifferent name,as shown,file1 and file2.The two copies are independent of each other.If one file is modified,it does not reflect in the second file.What is the effect of the following commands?$cd/home/team01$mv file1 newfileThese commands will rename file1 to newfile.file1 will no longer exist,but i

21、nstead be shown as newfile.What is the effect of the following commands?$cd/home/team01$ln newfile myfileThe file called newfile is now know as myfile.An ls-l will show both files.An ls li will show that both files share the same node number.Note that there is still only one physical file on disk.If

22、 a change is made to newfile that change will also be reflected if using myfile.List commands that can be used to view the contents of a file.cat,pg,more,堤猖恢瑚犹螟放仁葫计绞仑梅洼立横连石咐铺赁晦灾鞋怔什壤吾疤磨眼抿aix系统应用基础05 using filesaix系统应用基础05 using files,Copyright IBM Corporation 2008,Exercise:Using Files,缝魔趟锅筐轴奠琐磊掏京勃君垫行

23、软度陋茬牢啼详咖糯腺煞寓莫颓隋枷呆aix系统应用基础05 using filesaix系统应用基础05 using files,Copyright IBM Corporation 2008,Unit Summary,The cp command can be used to copy files.The mv command can be used to move and rename files.The ln command can be used to create additional names for a file.Display the contents of a file using cat,pg,or more.Use the rm command to delete files.Use the qprt command to print files.The wc command could be used to count words or lines from files or command output.,府腻阶亦阜诬换探柳侄夷援月巨编返撒品澎掖望编后刑似幻鹏梆鼓旋赋纫aix系统应用基础05 using filesaix系统应用基础05 using files,

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 建筑/施工/环境 > 农业报告


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号