Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4616
  • 博文数量: 4
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 10
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-08 11:24
文章分类
文章存档

2013年(4)

我的朋友

分类: 系统运维

2013-10-16 18:03:12

# pwd
/oraclelog/test            
#
# ls
1.txt    2.txt    abc.txt  test1       //abc.txt 文件中需要列出排除的目录名
#
#
# cat abc.txt
test1

# 把test 目录打包,排除test1 目录(需要注意:加了-X 参数 后面的目录要和当前打包的目录一致)
# tar -cvf /oraclelog/test/tst.tar -X abc.txt /oraclelog/test
a /oraclelog/test
a /oraclelog/test/2.txt 1 blocks.
a /oraclelog/test/1.txt 1 blocks.
a /oraclelog/test/test1 (excluded)
a /oraclelog/test/abc.txt 1 blocks.
abc.tar same as archive file, not archived
 
# ls
1.txt    2.txt    abc.txt  test1    tst.tar
# tar -tvf tst.tar
drwxr-xr-x   0 0        0  4月08 17:45:15 2011 /oraclelog/test/
-rw-r--r--   0 0        9  4月08 11:56:28 2011 /oraclelog/test/2.txt
-rw-r--r--   0 0        9  4月08 11:56:13 2011 /oraclelog/test/1.txt
-rw-r--r--   0 0        6  4月08 16:03:16 2011 /oraclelog/test/abc.txt
 
阅读(350) | 评论(0) | 转发(0) |
0

上一篇:migratepv rootvg

下一篇:没有了

给主人留下些什么吧!~~