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