练习:
1、找出/boot目录中文件类型为目录的内容
find 文件路径 -name -size 按大小查找 -type 按类型 -f 文件 -d 目录 -l 符号链接 -a and 一块查找
find /boot -name grub.conf -a -type f -exec cp ‘{}’ /tmp ; -a and 两个条件同时满足 -exec 相当于管道符号 ‘{}’ 前面命令查找出来的内容 ; 默认的结束符号
方法一:
方法一:tar -jcf /root/Desktop/1901class.tar.bz2 1901class/ -j 使用bzip2压缩工具压缩 -c create 创建 -f 后面跟新建的文件名
tar -tf /root/Desktop/19class.tar.bz2 -t 不解压缩查看文件内容
tar -xf 1901class.tar.gz -C /opt -x 解压缩并解包 -C 指定解压路径
方法二:
tar -zcf /root/Desktop/1901class.tar.gz 1901class/ -z 使用gzip压缩工具压缩 -c create 创建 -f 后面跟新建的文件名
tar -tf /root/Desktop/19class.tar.gz -t 不解压缩查看文件内容
tar -xf 1901class.tar.gz -C /opt -x 解压缩并解包 -C 指定解压路径
、