全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
操作系统原理与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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026 年跌倒坠床风险专项护理质控研讨
- 《电动汽车用轮毂电机系统》
- 2026年汽车导航蓝牙改装连接稳定性
- 行政法与行政诉讼法简答题案例分析题题库及答案
- 生物化学与分子生物学题库及答案
- 临沂一级建造师考试(通信与广电工程管理与实务)真题及答案
- 大连市一级建造师考试(通信与广电工程管理与实务)真题及答案
- 统编版语文三年级上册第八单元综合能力提优卷
- 2026年上海闵行职业技术学院教师招聘参考题库附答案
- 2026年慢病防控绩效考核与提质增效高级职称试卷
- 2023年美国肝病学会实践指导:静脉曲张出血介入治疗摘要
- 中国融通资源开发集团有限公司面向退役军人专项招聘100人笔试参考题库及答案详解
- 中国老视矫正多专科管理专家共识(2026年)
- 2026年跆拳道裁判员等级考试真题
- 2026年天津市高考英语首考试卷试题完整版(含答案详解+听力MP3)
- 刑事控告书模板
- 2026内蒙古恒正实业集团招聘65名工作人员备考题库含答案
- Z20名校联盟(浙江省名校新高考研究联盟)2026届高三第二次联考地理(含答案)
- 2025-2026学年人教版九年级上册数学期末测试卷(含答案)
- 兵检职业适应测试题及答案
- 2025年游戏代练兼职合同模板
评论
0/150
提交评论