linux基本操作命令实验原理,《操作系统原理与linux》实验一linux基本命令

41528d3028836879cd698677c3999917.gif《操作系统原理与linux》实验一linux基本命令

《操作系统原理与Linux》实验报告 实验名称:实验一 Linux 基本命令的使用 实验日期: 2011-11-1 班 级:b09511 学 号:20094051141 姓 名:郭峰禄 计算机号: 一、实验目的 1.掌握 Linux 中文件操作基本命令使用方法。 2.掌握 Linux 中查看进程、内存和磁盘情况基本命令的使用方法。 二、实验内容 1.登录 Linux 系统。2.用 pwd 命令显示用户登录后所处的用户主目录。 [root@localhost ~]# pwd /root3.用以下三个命令显示用户主目录中的内容,并比较命令之间的区别。Lsroot@localhost ~]# lsb Desktop m partitioninfo student1.c students.cb.c example_63.c Makefile student student.c usb.ccurrent.c home m.c student1 students ls –a[root@localhost ~]# ls -a. .gconf .qt .gconfd .realplayerrc.1.swp .gnome2 .recently-used.4.c.swp .gnome2_private .scimls -al[root@localhost ~]# ls -al总用量 452drwxr-x--- 22 root root 4096 11 月 1 16:19 .drwxr-xr-x 27 root root 4096 11 月 1 16:17 -rw------- 1 root root 12288 3 月 28 2011 .1.swp.4.在用户主目录中通过 touch 命令建立下列 10 个文件(例如:touch a): news_oct_a1 news_oct_b2 news_oct_c3 news_dec_b3 work_nov_a1 work_nov_b2 work_nov_c3 mail_dev_a2 mail_oct_c3 games_dec_b1 [root@localhost ~]# touch news_oct_a1 [root@localhost ~]# touch news_oct_b2 [root@localhost ~]# touch news_oct_c3 [root@localhost ~]# touch news_oct_b3 [root@localhost ~]# touch work_nov_a1[root@localhost ~]# touch work_nov_b2 .[root@localhost ~]# touch mail_dev_a2 5.使用 ls 命令查看目录,确认新建文件是否存在。 [root@localhost ~]# ls news_oct_a1 news_oct_a1 [root@localhost ~]# ls news_oct_a1 -al -rw-r--r-- 1 root root 0 11 月 1 16:49 news_oct_a1 6.通过 ls –l 命令查看文件 news_oct_al 的权限,并将它的权限改为任何人都可以读、写和执 行。 root@localhost ~]# ls news_oct_a1 -l -rw-r--r-- [root@localhost ~]# chmod 777 news_oct_a17.通过 mkdir 命令在用户主目录中建立五个子目录:reports、september 、october 、november 和 december。在 reports 子目录中再建立三个子目录:1、2、3。 [root@localhost ~]# mkdir reports october november december [root@localhost ~]# cd reports [root@localhost reports]# mkdir 1 2 3 8.将/etc/passwd 文件复制到目录 1 下并重命名为 mypasswd,给 mypasswd 文件建立一个硬文 件链接 hardpass 和一个软文件链接 softpass。查看 mypasswd、hardpass 和 softpass 三个文件的节点 信息。 [root@localhost ~]# cp /etc/passwd reports/1/mypasswd [root@localhost ~]# ln reports/1/mypasswd hardpass [root@localhost ~]# ln -s reports/1/mypasswd softpass 842843 hardpass 842843 reports/1/mypasswd 810910 softpass9.将用户主目录中含字符串“dec” 且含字符“b“的文件移动到 december 子目录下。10.将用户主目录中剩下含字符串“oct”和字符串“nov”的文件分别移动到相应月份的子目录中。11.删除 december 子目录及其中的文件。 12.使用 ps 命令查看系统中进程的运行情况。 [root@localhost ~]# psPID TTY TIME 428 pts/0 00:00:00 bash9476 pts/0 00:00:00 ps 13.使用 free 命令查看系统中内存的使用情况。 [root@localhost ~]# freetotal used free shared buffers cached Mem: 2074652 599008 1475644 0 25500 413168 -/+ buffers/cache: 160340 1914312Swap: 0 0 0 14.使用 df 命令查看系统中磁盘空间的使用情况。 [root@localhost ~]# df Filesystem 1K- 块 已用 可用 已用% 挂载点 /dev/sda1 9912560 3928

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值