Re: tar排除目录
On Wednesday 16 November 2005 19:41, snow wrote:
> 想备份一下系统,用的下面的命令
> tar cvpzf backup.tgz / --exclude=/proc --exclude=/lost+found
> --exclude=/backup.tgz --exclude=/mnt --exclude=/sys
> 但事实上根本没能排除后面那些目录,请问应该怎么做呢?
> 系统是ubuntu breezy, tar (GNU tar) 1.15.1
cd / && find . -path './proc' -prune -o -path './lost+found' -prune -o -path
'./backup.tgz' -prune -o -path './mnt' -prune -o -path './sys' -prune -o
-print | cpio -oavB --format=ustar | gzip >backup.tgz
--
Regards,
Gong Jie (龚颉)
Email: neo@mamiyami.com
Reply to:
- References:
- tar排除目录
- From: snow <catinsnow@gmail.com>