tar zcvf /tmp/backup.tar.gz /* --exclude=/proc/* --exclude=/tmp/* 备份以后的目标文件是backup.tar.gz,使用exclude参数排除proc,tmp目录下的文件,对这两个目录下的文件不进行打包备份。