网络编程技术实验指导书

网络编程技术实验指导书

ID:18952000

大小:171.00 KB

页数:11页

时间:2018-09-27

网络编程技术实验指导书_第1页
网络编程技术实验指导书_第2页
网络编程技术实验指导书_第3页
网络编程技术实验指导书_第4页
网络编程技术实验指导书_第5页
资源描述:

《网络编程技术实验指导书》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、网络编程技术-实验指导书     董黎刚信息与电子工程学院浙江工商大学2006/10/314:29:00Content1.OperationofLinux(操作性)11.1Purpose11.2Content11.3Hints22.CProgrammingPractice(设计性)32.1Purpose32.2Content32.3Grading33.SimpleSocketProgramming(验证性)43.1Purpose43.2Content43.3Hints44.ConcurrencySocketProgramming(验

2、证性)54.1Purpose54.2Content54.3Hints55.WindowsSocketProgramming(验证性)65.1Purpose65.2Content65.3Hints66.AdvancedSocketProgramming(设计性)76.1Purpose76.2Content76.3Grading8ExperimentsofNetworkProgrammingLastupdated:2021/6/251.OperationofLinux(操作性)Name:No.:Class:Grading:1.1Purp

3、oseReviewtheoperationofLinux,inparticularshellcommands(bash).1.2ContentEachstudentisrequiredtofinishallofthefollowingtasks.PartIProgramming1)Use“vi”toconstructaprogram“helloworld.c”thatcanprint“helloworld”.Compileandrunit.(hint:gcchelloworld.c,./a.out)PartIIFile/Direct

4、ory2)Makeanewsub-directoryincurrentdirectory,thenmove“helloworld.c”intothisnewsub-directory.(hint:mkdirsource,mvold_filenew_file)3)Changetheaccesspermissionsof“helloworld.c”to-rw-r-xrw-.(hint:chmod656helloworld.c)4)Findafilenamed“emacs”inharddisk.(hint:find/-nameemacs)

5、5)Makeahardlink,whichiscalled“helloworld1.c”,of“helloworld.c”.(hint:lnold_filenew_file);6)Makeasymboliclink,whichiscalled“helloworld2.c”,of“helloworld1.c”.Thenremovehelloworld1.c.(hint:ln–sold_filenew_file)Checktheoutputof“ls–l”tocomparethehardlinkandsoftlink.7)Makeaco

6、pyof“helloworld.c”.Thenewfileis“helloworld3.c”.(hint:cpsource_filedestination_file)8)Archiveandcompressallthefilesinsideasub-directory.(hint:tarcvfnew_file.tar *,gzipold_file)PartIIIText9)Showthefirst10lineofhelloworld.cinreverseorder.(hint:headhelloworld.c

7、sort-r)10)P

8、rintthenumberofbytes,words,andlinesofhelloworld.ctoafilecalled“info.txt”.(hint:wchelloworld.c>info.txt)11)Mergehelloworld.candinfo.txttoanewfile“helloworld.txt”.(hint:pastehelloworld.cinfo.txt>helloworld.txt)12)Printcolumn3-5of“helloworld.c”.(hint:cut–c3-5helloworld.c)

9、13)Remove“/home/your_name/source”.(hint:rmdir,rm)PartIVProcess14)comparethedifferenceamong“ps”,“ps–f”,and“ps–ef”.15)e

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。