正在加载……
tar排除目录
| |
Posted in LAMP on October 9, 2006 / 引用(0)
想备份一下系统,用的下面的命令
> tar cvpzf backup.tgz / --exclude=/proc  --exclude=/lost+found
> --exclude=/backup.tgz --exclude=/mnt  --exclude=/sys
> 但事实上根本没能排除后面那些目录,请问应该怎么做呢?
> 系统是ubuntu breezy, tar  (GNU tar) 1.15.1
>

hi,
如果是排除多个目录,可以将需要排除的目录每个一行写入文件中,如  tar_exclude:
tar -cz --exclude-from tar_exclude -vf from_dir.tar.gz  from_dir
This entry comes from 本站原创 and has been read for 365 times.It is tagged with .
发表评论

昵称

网址

电邮

OpenID登入 高级选项 表情