AI摘要
CentOS系统管理技巧:文件压缩解压、多文件删除、邮件系统操作和子目录大小查看。
压缩与解压文件
tar -czvf maintenance_api.tar.gz maintenance_api
tar -xzvf maintenance_api.tar.gz多文件删除
-exec rm -f {} :对找到的每一个文件({} 代表文件名),执行 rm -f 命令
表示对每个文件单独执行一次 rm 命令
find /var/spool/postfix/maildrop -type f -exec rm -f {} \;Postfix 邮件系统
systemctl stop postfix
systemctl start postfix
systemctl status postfix查看当前子目录大小
du -h --max-depth=1 | sort -hr