tar -czvf /root/1.tar.gz /test/* --remove-files


解释:在/root/下创建一个1.tar.gz 打包目录为/test/* 并删除/test/*的原文件