快捷搜索:   nginx

Linux tar 打包文件列表

1. cat filelist | xargs tar cf a.tar 还是挺不错的
filelist 是要打包的列表

2.   tar -czv -T filelist -f /backup.tar.gz  

   -T选项可以指定包含要备份的档案的列表

3. 解压到指定目录

tar xvf filename.tar -C /指定目录

4.打包系统

tar -zcvf root.tar.gz --exclude=/asher --exclude=/var/www/html/rra/* \
--exclude=/proc/* --exclude=/sys/* --exclude=/dev/shm --exclude=/var/log \
--exclude=/mnt/*   --exclude=/dev/pts --exclude=/var/lib/nfs/rpc_pipefs /

顶(0)
踩(0)

您可能还会对下面的文章感兴趣:

最新评论