File: tar.man

package info (click to toggle)
tcllib 1.10-dfsg-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 17,708 kB
  • ctags: 6,122
  • sloc: tcl: 106,354; ansic: 9,205; sh: 8,707; xml: 1,766; yacc: 753; makefile: 115; perl: 84; f90: 84; python: 33; ruby: 13; php: 11
file content (99 lines) | stat: -rw-r--r-- 2,643 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin tar n 0.4]
[moddesc   {Tar file handling}]
[titledesc {Tar file creation, extraction & manipulation}]
[require Tcl 8.4]
[require tar [opt 0.4]]
[description]


[para]

[list_begin definitions]

[call [cmd ::tar::contents] [arg tarball]]

Returns a list of the files contained in [arg tarball].
[para]

[call [cmd ::tar::stat] [arg tarball] [opt file]]

Returns a nested dict containing information on the named [opt file] in [arg tarball],
or all files. the top level are pairs of filename and info. The info is a dict in the form
mode uid gid size mtime type linkname uname gname devmajor devminor

[example {
% ::tar::stat tarball.tar
foo.jpg {mode 0644 uid 1000 gid 0 size 7580 mtime 811903867 type file linkname {} uname user gname wheel devmajor 0 devminor 0}
}]


[call [cmd ::tar::untar] [arg tarball] [arg args]]

Extracts [arg tarball]. [arg -file] and [arg -glob] limit the extraction
to files which exactly match or pattern match the given argument. No error is
thrown if no files match. Returns a list of filenames extracted and the file
size. The size will be null for non regular files.

[list_begin options]
[opt_def -dir dirName]
[opt_def -file fileName]
[opt_def -glob pattern]
[opt_def -nooverwrite]
[opt_def -nomtime]
[opt_def -noperms]
[list_end]
[para]

[example {
% foreach {file size} [::tar::untar tarball.tar -glob *.jpg] {
puts "Extracted $file ($size bytes)"
}
}]

[call [cmd ::tar::get] [arg tarball] [arg fileName]]

Returns the contents of [arg fileName] from the [arg tarball]
[para]

[call [cmd ::tar::create] [arg tarball] [arg files] [arg args]]

Creates a new tar file containing the [arg files]. [arg files] must be specified
as a single argument which is a proper list of filenames.

[list_begin options]
[opt_def -dereference]
[list_end]
[para]

[call [cmd ::tar::add] [arg tarball] [arg files] [arg args]]

Appends [arg files] to the end of the existing [arg tarball]. [arg files] must be specified
as a single argument which is a proper list of filenames.

[list_begin options]
[opt_def -dereference]
[list_end]
[para]

[call [cmd ::tar::remove] [arg tarball] [arg files]]

Removes [arg files] from the [arg tarball]

[list_end]


[section {BUGS, IDEAS, FEEDBACK}]

This document, and the package it describes, will undoubtedly contain
bugs and other problems.

Please report such in the category [emph tar] of the
[uri {http://sourceforge.net/tracker/?group_id=12883} {Tcllib SF Trackers}].

Please also report any ideas for enhancements you may have for either
package and/or documentation.


[keywords tar {tape archive} archive]
[manpage_end]