1. 查看根目录下有几个文件 [root@localhost /]# ls |wc -w 20
  2. 根目录下创建TEMP文件夹和TEMP下创建PHONE文件夹 [root@localhost /]# mkdir -p /temp/phone [root@localhost /]# ls 1 boot etc lib media opt root sbin sys tmp var bin dev home lib64 mnt proc run srv temp usr [root@localhost /]# cd temp/ [root@localhost temp]# ls phone
  3. 将PHONE复制到根目录下 [root@localhost temp]# cp -r phone/ /
  4. 在PHONE下创建 password文件并在password文件中写入若干个字母 [root@localhost /]# cd phone/ [root@localhost phone]# vim password
  5. 删除temp中phone文件夹 [root@localhost phone]# cd /temp/ [root@localhost temp]# rm -rf phone/
  6. 查找password文件的位置 [root@localhost /]# find -name "password" find: ‘./run/user/1000/gvfs’: 权限不够 ./etc/openldap/certs/password ./usr/share/doc/dialog-1.2/samples/password ./phone/password
  7. 查找password文件的最后一行内容 [root@localhost /]# tail -1 /phone/password sdsdsdfss
  8. 统计temp目录的大小 [root@localhost /]# du -h /temp/ 0 /temp/
  9. 统计temp下建立ts1,ts2,ts3 [root@localhost /]# cd /temp/ [root@localhost temp]# mkdir ts1 ts2 ts3
  10. 复制password到ts3 [root@localhost temp]# cp -r /phone/password ts3/
  11. 使用tar命令将temp文件夹进行不归档压缩,压缩文件名字为test.tar [root@localhost /]# tar -cvf test.tar /temp
  12. 查看teat.tar文件的大小,并记录到size.txt文件中 [root@localhost /]# du -sh test.tar >size.txt
  13. 使用gzip压缩test.tar [root@localhost /]# gzip test.tar
  14. 查看test.tar.gz的大小 [root@localhost /]# du -sh test.tar.gz 4.0K test.tar.gz
  15. 删除test.tar.gz文件 [root@localhost /]# rm test.tar.gz rm:是否删除普通文件 "test.tar.gz"?y
  16. 使用tar命令归档压缩temp文件夹为test.tar.gz tar -zcvf test.tar.gz /temp
  17. 解压test.tar.gz到test文件夹 cd test tar -zxvf /test.tar.gz
  18. 将/etc下的文件详细信息拷贝到/test/etc.txt ls -l >/test/etc.txt
  19. 使用vim打开etc.txt在末行加入etc三个字然后不保存退出 vim /test/etc.txt

软盘驱动器 /dev/fd(0-1) 当前CD ROM/DVD ROM /dev/cdrom IDE硬盘 /dev/hdXY 第一个磁盘阵列设备 /dev/st0