Skip to content

Simple compressing and decompressing command-line tools using Apache Commons Compress.

License

Notifications You must be signed in to change notification settings

prantlf/apache-archiver

Repository files navigation

apache-archiver

Build Status Maintainability

Simple compressing and decompressing command-line tools using Apache Commons Compress. You can use them as source code examples too.

How to Use

Run the command-line tools without parameters to see the usage description:

$ java -cp commons-compress-1.18.jar:. untar
Usage: untar l|x <input archive> [output directory]

$ java -cp commons-compress-1.18.jar:. unzip
Usage: unzip l|x <input archive> [output directory]

$ java -cp commons-compress-1.18.jar:. tar
Usage: tar <output archive> [input directory]

$ java -cp commons-compress-1.18.jar:. zip
Usage: zip <output archive> [input directory]

List contents of a TAR.GZ archive:

$ java -cp commons-compress-1.18.jar:. untar l commons-compress-1.18-bin.tar.gz
File "commons-compress-1.18/LICENSE.txt"
...

Uncompress a ZIP archive to the current directory:

$ java -cp commons-compress-1.18.jar:. unzip x commons-compress-1.18-bin.zip .
Unpacking "commons-compress-1.18/LICENSE.txt"...
...

Compress a TAR archive of the current directory:

$ java -cp commons-compress-1.18.jar:. tar test.tar
Packing "./LICENSE"...
...

How to Build

Make sure, that you installed OpenJDK Java and GNU Make or compatibles. The following command will download the common-compress package and build the command line tools:

make all

The following command will test, that the command-line tools work:

make test

The following command will remove build and test output files:

make clean

The following command will remove all files created by the Makefile, including the downloaded commons-compress package:

make distclean

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style.

License

Copyright (c) 2019 Ferdinand Prantl

Licensed under the Apache 2.0 license.

About

Simple compressing and decompressing command-line tools using Apache Commons Compress.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published