



全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
操作系统原理与Linux实验报告实验名称:实验一 Linux基本命令的使用实验日期: 2011年11月1日班 级:B09513学 号:20094051311姓 名:王晓珍计算机号:一、实验目的1掌握Linux中文件操作基本命令使用方法。2掌握Linux中查看进程、内存和磁盘情况基本命令的使用方法。二、实验内容1登录Linux系统。/root 2用pwd命令显示用户登录后所处的用户主目录。 3用以下三个命令显示用户主目录中的内容,并比较命令之间的区别。 lsa.out example.c greet hello.c hello.o netatate.txtdelete get greet.c hello.h hello.s partitioninfodelete.c get.c hello hello.h.gch Mail wangDesktop get.o hello,c hello.i makefile ls aa.out example.c greet hello.c hello.o netatate.txtdelete get greet.c hello.h hello.s partitioninfodelete.c get.c hello hello.h.gch Mail wangDesktop get.o hello,c hello.i makefile ls -al a.out example.c greet hello.c hello.o netatate.txtdelete get greet.c hello.h hello.s partitioninfodelete.c get.c hello hello.h.gch Mail wangDesktop get.o hello,c hello.i makefile 4在用户主目录中通过touch命令建立下列10个文件(例如:touch a): news_oct_a1news_oct_b2 news_oct_c3 news_dec_b3work_nov_a1 work_nov_b2 work_nov_c3mail_dev_a2 mail_oct_c3games_dec_b1rootlocalhost # touch news_oct_alrootlocalhost # touch news_oct_b2rootlocalhost # touch news_oct_c3rootlocalhost # touch news_dec_b3rootlocalhost # touch work_nov_a1rootlocalhost # touch work_nov_b2rootlocalhost # touch work_nov_c3rootlocalhost # touch mail_dev_a2rootlocalhost # touch mail_oct_c3rootlocalhost # touch games_dec_b15使用ls 命令查看目录,确认新建文件是否存在。a.out greet hello.s news_oct_c3delete greet.c Mail partitioninfodelete.c hello mail_dev_a2 wangDesktop hello,c mail_oct_c3 work_nov_a1example.c hello.c makefile work_nov_b2games_dec_b1 hello.h netatate.txt work_nov_c3get hello.h.gch news_dec_b3get.c hello.i news_oct_alget.o hello.o news_oct_b26通过ls l命令查看文件news_oct_al的权限,并将它的权限改为任何人都可以读、写和执行。-rw-r-r- 1 root root 0 11月 1 16:41 news_oct_alrootlocalhost # chmod 777 news_oct_al-rwxrwxrwx 1 root root 0 11月 1 16:41 news_oct_al 7通过mkdir命令在用户主目录中建立五个子目录:reports、september、october、november和december。在reports子目录中再建立三个子目录:1、2、3rootlocalhost # mkdir reports september october noverber decemberrootlocalhost # mkdir reports/1 rootlocalhost # mkdir reports/2rootlocalhost # mkdir reports/38将/etc/passwd文件复制到目录1下并重命名为mypasswd,给mypasswd文件建立一个硬文件链接hardpass和一个软文件链接softpass。查看mypasswd、hardpass和softpass三个文件的节点信息。rootlocalhost # cp /etc/passwd reports/1rootlocalhost # ls reports/1/passwdrootlocalhost # cp reports/1/passwd mypasswdrootlocalhost # ls mypasswdmypasswd 9将用户主目录中含字符串“dec”且含字符b的文件移动到december子目录下。rootlocalhost # ls /root/*dec*b*/root/news_dec_b3/root/december:games_dec_b1rootlocalhost # mv games_dec_b1 december/rootlocalhost # ls december/games_dec_b1rootlocalhost # mv news_dec_b3 december/rootlocalhost # mv december december/mv: 无法将目录december移动至本身的子目录december/december下rootlocalhost # ls december/games_dec_b1 news_dec_b310将用户主目录中剩下含字符串“oct”和字符串“nov”的文件分别移动到相应月份的子目录中。rootlocalhost # ls *oct*mail_oct_c3 news_oct_a1 news_oct_b2 news_oct_c3rootlocalhost # mv *oct* octoberrootlocalhost # ls *nov*work_nov_a1 work_nov_b2 work_nov_c3november:rootlocalhost # mv *nov* novembermv: 无法将目录november移动至本身的子目录november/november下 11删除december子目录及其中的文件。rootlocalhost # rmdir december12使用ps命令查看系统中进程的运行情况。rootlocalhost # ps -lF S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD4 S 0 16702 16642 0 75 0 - 1387 wait pts/0 00:00:00 bash0 R 0 14605 16702 0 76 0 - 1274 - pts/0 00:00:00 psrootlocalhost # 13使用free命令查看系统中内存的使用情况。rootlocalhost # free total used free shared buffers cachedMem: 2074652 497236 1577416 0 19836 321116-/+ buffers/cache: 156284 1918368Swap: 0 0 014使用df命令查看系统中磁盘空间的使用情况。rootlocalhost # dfFilesystem 1K-块 已用 可用 已用% 挂载点/dev/sda1 9912560 3856060 5544832 42% /none 1037324 0 1037324 0% /dev/shm/dev/sda2 10032560 53004 9979556 1% /mnt/WinC/dev/s
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 在线办公软件开发合同协议
- 商业办公楼租赁协议书
- 消防施工合同条款解析与范本
- 家庭小事中的爱与关怀记事作文(5篇)
- 内科护理循环大题题库及答案解析
- 围城中的讽刺手法与社会批判深度解读:大学语文高级课程教案
- 培训效果评估与学习成果转化工具
- 小区农业种植与养殖共管协议
- 商业园区员工餐厅管理服务协议
- 贷款协议履行承诺书3篇
- 读书分享读书交流会《活着》课件2
- 三人合伙开公司协议书:免修版模板范本
- (完整版)经典无领导小组讨论题目(附答案)
- 健康心理快乐成长小学课件
- 北师大版四年级上册数学早读资料PPT
- 职业规划PPT-第四章-探索职业
- 马克思主义政治经济学概论
- 一次性竹质餐具(刀、叉、匙)通用技术要求 DB43-T 2648-2023
- 拖欠工资协议书
- 健身理论与指导课件
- 驾驶员从业资格证电子版
评论
0/150
提交评论