1:在/tmp目录下,新建目录director新建三个txt文件,分别命名为file1、file2、file3.
用vi编辑器分别在三个文件中输入内容。
[root@localhost ~]# cd /tmp
[root@localhost tmp]# cd direvtor/
[root@localhost director]# touch file1.txt file2.txt file3.txt
[root@localhost director]# ls
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.txt file2.txt file3.txt>filetest.txt
[root@localhost director]# ls
3:在director目录下新建一个open目录,并在open目录下创建openfile目录。
所有目录权限为r-xr--r--。
[[root@localhost ~] director]# mkdir -m 544 open
[[root@localhost ~] director]# cd open
[[root@localhost ~] open]# mkdir -m 544 openfile
[[root@localhost ~] open]# ll
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]# ll