ZIPTOOL(1) | General Commands Manual | ZIPTOOL(1) |
ziptool
— modify
zip archives
ziptool |
[-ceghnrst ] [-l
length] [-o
offset] zip-archive
command [command-args ...]
[command [command-args ...]
...] |
ziptool
modifies the zip archive
zip-archive according to the
commands given.
Supported options:
-c
-e
-n
).-g
stat
command).-h
-l
length-o
.-n
-e
.-o
offset-l
.-r
stat
command).-s
stat
command).-t
For all commands below, the index is zero-based. In other words, the first entry in the zip archive has index 0.
Supported commands and arguments are:
add
name contentadd_dir
nameadd_file
name file_to_add offset lenadd_from_zip
name archivename index offset lencat
indexcount_extra
index flagscount_extra_by_id
index extra_id flagsdelete
indexdelete_extra
index extra_idx flagsdelete_extra_by_id
index extra_id extra_index flagsget_archive_comment
get_extra
index extra_index flagsget_extra_by_id
index extra_id extra_index flagsget_file_comment
indexget_num_entries
flagsname_locate
name flagsrename
index namereplace_file_contents
index dataset_archive_comment
commentset_extra
index extra_id extra_index flags valueset_file_comment
index commentset_file_compression
index method compression_flagsset_file_encryption
index method passwordset_file_mtime
index timestampset_file_mtime_all
timestampset_password
passwordstat
indexSome commands take flag arguments. Supported flags are:
Some commands take compression method arguments. Supported methods are:
Some commands take encryption method arguments. Supported methods are:
The ziptool
utility exits 0 on
success, and >0 if an error occurs.
Add a file called teststring.txt to the zip archive testbuffer.zip with data “This is a test.\n” where “\n” is replaced with a newline character:
ziptool testbuffer.zip add teststring.txt \"This is a test.\n\"
Delete the first file from the zip archive testfile.zip:
ziptool testfile.zip delete 0
ziptool
was added in libzip 1.1.
Dieter Baron <dillo@nih.at> and Thomas Klausner <tk@giga.or.at>
December 18, 2017 | Debian |