linux 解压 某文件夹中,弱智问题:如何用tar只解压缩出tar.gz中的某一个文件夹...

-t 选项列举包里的文件, 匹配模式和-x提取一样的

有两种匹配模式,一种是包含--include,一种是排斥--exclude, 至于-I/T, -X只是从文件中读取匹配模式

tar [bundled-flags ] [ | ...]

tar {-c} [options] [files | directories]

tar {-r | -u} -f archive-file [options] [files | directories]

tar {-t | -x} [options] [patterns]

-t      List archive contents to stdout.

-u      Like -r, but new entries are added only if they have a modifica-

tion date newer than the corresponding entry in the archive.

Note that this only works on uncompressed archives stored in reg-

ular files.  The -f option is required.

-x      Extract to disk from the archive.        If a file with the same name

appears more than once in the archive, each copy will be

extracted, with later copies overwriting (replacing) earlier

copies.

--exclude pattern (-W exclude=pattern)

Do not process files or directories that match the specified pat-

tern.  Note that exclusions take precedence over patterns or

filenames specified on the command line.

-f file

Read the archive from or write the archive to the specified file.

The filename can be - for standard input or standard output.  If

not specified, the default tape device will be used.  (On

FreeBSD, the default tape device is /dev/sa0.)

-T filename

In x or t mode, tar will read the list of names to be extracted

from filename.  In c mode, tar will read names to be archived

from filename.  The special name ``-C'' on a line by itself will

cause the current directory to be changed to the directory speci-

fied on the following line.  Names are terminated by newlines

unless --null is specified.  Note that --null also disables the

special handling of lines containing ``-C''.

-X filename

Read a list of exclusion patterns from the specified file.  See

--exclude for more information about the handling of exclusions.

[本帖最后由 angeljyt 于 2008-6-18 12:39 编辑]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值