https://github.com/prantlf/apache-archiver
Simple compressing and decompressing command-line tools using Apache Commons Compress.
https://github.com/prantlf/apache-archiver
apache-commons commons-compress tar untar unzip zip
Last synced: 2 months ago
JSON representation
Simple compressing and decompressing command-line tools using Apache Commons Compress.
- Host: GitHub
- URL: https://github.com/prantlf/apache-archiver
- Owner: prantlf
- License: apache-2.0
- Created: 2019-03-08T08:31:25.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-10T10:41:17.000Z (almost 7 years ago)
- Last Synced: 2025-02-01T10:42:58.359Z (11 months ago)
- Topics: apache-commons, commons-compress, tar, untar, unzip, zip
- Language: Java
- Size: 20.5 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
apache-archiver
===============
[](https://travis-ci.org/prantlf/apache-archiver)
[](https://codeclimate.com/github/prantlf/apache-archiver/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:
```text
$ java -cp commons-compress-1.18.jar:. untar
Usage: untar l|x [output directory]
$ java -cp commons-compress-1.18.jar:. unzip
Usage: unzip l|x [output directory]
$ java -cp commons-compress-1.18.jar:. tar
Usage: tar [input directory]
$ java -cp commons-compress-1.18.jar:. zip
Usage: zip [input directory]
```
List contents of a TAR.GZ archive:
```text
$ 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:
```text
$ 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:
```text
$ 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:
```sh
make all
```
The following command will test, that the command-line tools work:
```sh
make test
```
The following command will remove build and test output files:
```sh
make clean
```
The following command will remove all files created by the `Makefile`, including the downloaded `commons-compress` package:
```sh
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.
[Apache Commons Compress]: https://commons.apache.org/proper/commons-compress/
[OpenJDK Java]: https://openjdk.java.net/
[GNU Make]: https://www.gnu.org/software/make/