1:在/tmp目录下,新建目录director新建三个txt文件,分别命名为file1、file2、file3.用vi编辑器分别在三个文件中输入内容。[root@localhost ~]# cd /tmp
[root@localhost tmp]# cd direvtor/
[root@localhost director]#touch file1.txtfile2.txt file3.txt
[root@localhost director]#Is
file1.txt file2.txt file3.txt
2:将file1/file2/file3三个文件中内容合并到一个文件中命名为filetest.txt
[root@localhost~]#cd /tmp
[root@localhost tmp]# cd director/
[root@localhost director]# cat file1.txtfile2.txt file3.txt>filetest.txt
[root@localhost director]#Is
3:在director目录下新建一个open目录,并在open目录下创建openfile目录。
所有目录权限为r-xr--r--。
[[root@localhost~] director]# mkdir -m544 open
[[root@localhost ~] director]#cd open [[root@localhost~] open]#mkdir -m 544openfile
[[root@localhost~] open]#
4:将filetest.txt文件备份到/root下。并将/tmp/director目录移动到/usr中。
[[root@localhost ~] open]#cp -f /tmp/director/filetest.txt /root/
[[root@localhost ~] open]#mv -f /tmp/director/usr/
[[root@localhost ~] open]#cd /usr [[root@localhost ~] usr]#
5:将open目录及其子目录和文件删除。
[[root@localhost ~] Usr]# rm -rvf
/usr/director/open