https://github.com/neosmart/zipcat
Pipe contents of zip file to stdout, supporting multiple files.
https://github.com/neosmart/zipcat
command-line-tool compression zcat zip zipcat
Last synced: about 1 year ago
JSON representation
Pipe contents of zip file to stdout, supporting multiple files.
- Host: GitHub
- URL: https://github.com/neosmart/zipcat
- Owner: neosmart
- License: mit
- Created: 2017-05-07T13:54:38.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-10T03:33:16.000Z (about 9 years ago)
- Last Synced: 2024-04-26T12:46:21.720Z (about 2 years ago)
- Topics: command-line-tool, compression, zcat, zip, zipcat
- Language: Rust
- Size: 7.81 KB
- Stars: 11
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## `zipcat`
`zipcat` is a command-line utility that lets you pipe the contents of one or more compressed files to `stdout`, letting you easily search the contents of zip archives and more. `zipcat` has full support for actual zip archives (not just gz/deflate-compressed content), and provides options to optionally filter the files included/excluded from the enumeration.
### Installation
`zipcat` binaries are available via `cargo`, the rust package manager, as follows:
`cargo install zipcat`
Downloads for Windows are also available pre-compiled from NeoSmart Technologies at the `zipcat` homepage at https://neosmart.net/zipcat/
### Usage
Usage: zipcat ZIPFILE [options]
Pipes content of compressed file(s) within a zip archive to stdout
Options:
-h, --help print this help menu
-s, --silent suppress file names from being sent to stderr
-x, --exclude PATTERN
exclude file(s) matching pattern (can use more than
once)
-i, --include PATTERN
include only file(s) matching pattern (can use more
than once)
By default, `zipcat` will pipe the contents of all files it encounters in the zip archive. Contents are written to `stdout`, prefixed with a single line containing the filename that is output to `stderr` (so it is always safe to perform operations on `stdout`). This behavior can be disabled via the `--silent` flag.
For pattern matching, `zipcat` supports filtering which files will be printed to `stdout` via the `--include` and `--exclude` command line arguments (which may be used repeatedly to add additional include/exclude patterns). Not providing any `--include` filters is synonymous with a default `*` include filter to include all files from the archive in the output. `zipcat` uses [rust's `glob` library](https://doc.rust-lang.org/glob/glob/index.html) for pattern matching include/exclude filters. Filters should match the entire path within the archive (no leading `.` or `/` is required), rather than being a partial match. `*` will match any pattern in a filename, and `**` can be used to glob across sudirectories.