Linux網络操作系统实验指导书10最新.doc
文本预览下载声明
《Linux 网络操作系统》实验指导书
实验一 Linux基本命令熟悉及文本编辑器使用
1. Red Hat Linux的文件系统管理
一、实验目的
1、了解Linux操作系统的启动与登陆方法。
2、熟悉Linux字符界面、窗口系统的常用指令。
二、实验内容
在字符界面下,使用常用的Linux操作命令,完成下列内容。
在根目录(/)下新建一目录 test
[root@localhost root]# mkdir /test
[root@localhost root]# cd /test
[root@localhost test]# pwd
/test
改变当前目录至 /test ,在该目录下 ,以自己名字的英文缩写建一个空的文件 ,再建两个子目录(-xh)与(ah);
[root@localhost text]# touch pyh
[root@localhost text]# mkdri -- -xh
[root@localhost text]# ls
ah pyh –xh
[root@localhost text]# Is –l
后 [root@localhost text]# cd -- -xh
[root@localhost text]# ls
[root@localhost text]# touch text1
进入到(-xh)子目录中,新建一个空文件text1;
[root@localhost -xh]# cd ..
[root@localhost text]# ls
ah pyh –xh
[root@localhost text]# cd ah
[root@localhost text]# mkdir abc
[root@localhost text]# touch text2
[root@localhost text]# ls
abc text2
进入到(ah)子目录中, 再新建一个子目录(abc),同时建立空文件text2;
把刚建的text1文件移动到刚建立的abc子目录下,并改名为text3,同时把text2文件复制到-xh子目录中;
[root@localhost text]# ls
ah pyh –xh
[root@localhost text]# cd -- -xh
[root@localhost -xh]# ls
text1
[root@localhost -xh]# mv text1 /test/ah/abc
[root@localhost -xh]# ls
[root@localhost -xh]# cd /test/ah/abc/
[root@localhost -xh]# ls
text1
[root@localhost -xh]# mv text1/text3
[root@localhost -xh]# ls
text3
删除text3文件与-xh子目录及目录中的文件 ;并删除abc子目录;
[root@localhost root]# rm text3
Y
[root@localhost -xh]# ls
[root@localhost -xh]# cd..
[root@localhost root]# ls
[root@localhost root]# abc text2
[root@localhost root]# rmdir abc
[root@localhost root]# ls
text2
在根目录(/)下新建目录test,test1,把/etc/passwd分别复制到/test1与/test下,并分别改名为file1与file;
[root@localhost root]# cd[root@localhost root]# cd..
[root@localhost root]# cp /etc/passwd ./
[root@localhost root]# ls
ah passwd pyh –xh
[root@localhost root]# mv passwd file
[root@localhost root]# ls
ah file pyh -xh
查看file1文件的前二行与最后二行,并记录;
[root@localhost root]# cat file
[root@localhost root]# head -2 file
[root@localhost root]# tail -2 file
查看/etc/目录下的文件,并记录前两个文件的文件名;
查看/etc/目录中所有的文件中包含有sys字母的文件并记录;
[root@localhost root]# find /etc/ -name “
显示全部