Updated 2014-06-13 20:27:22 by AMG

tar is a Tcllib package for handling tar data.

Documentation  edit

official reference

Example: Extract a File from tar.gz  edit

To work with a gzipped tar file:
#! /bin/env tclsh
package require tar
set chan [open myfile.tar.gz]
zlib push gunzip $chan 
set data [::tar::get $chan some_file_in_tarball -chan]
close $chan

Example: Compress to tar.gz  edit

#! /bin/env tclsh
package require tar
set chan [open myfile.tar.gz w]
zlib push gzip $chan
tar::create $chan list_of_files -chan
close $chan