- 论坛徽章:
- 0
|
-t 选项列举包里的文件, 匹配模式和-x提取一样的
有两种匹配模式,一种是包含--include,一种是排斥--exclude, 至于-I/T, -X只是从文件中读取匹配模式
tar [bundled-flags <args>] [<file> | <pattern> ...]
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 编辑 ] |
|