1、在/usr目录中新建一个目录名称为:mytest,并在mytest目录中新建文件net.txt。设置文件的属性为文件属主(u)增加执行权限,文件属主同组用户(g)增加写入权限其他用户(o)删除读权限
[root@juan ~]# cd /usr
[root@juan usr]# mkdir mytest
[root@juan usr]# cd mytest
[root@juan mytest]# touch net.txt
[root@juan mytest]# chmod u+x net.txt
[root@juan mytest]# chmod g+w net.txt
[root@juan mytest]# chmod o-r net.txt
2、将mytest目录归档,并将其压缩成gz格式。列出归档文件里的内容
[root@juan mytest]# cd ..
[root@juan usr]# tar -zcf mytest.gz mytest
[root@juan usr]# tar -tf mytest.gz
mytest/
mytest/net.txt
3、查找/etc目录下大于20k且类型为普通文件的所有文件,查找/etc目录下以1vm开头并且文件格式为.comf的所有文件
[root@juan usr]# cd /etc
[root@juan etc]# find -type f -size +20k
[root@juan etc]# find -name "lvm*.conf"