tzgrep

Crates.iotzgrep
lib.rstzgrep
version
sourcesrc
created_at2022-10-10 06:50:37.823966
updated_at2024-10-20 16:40:15.147858
descriptiongrep tar.gz
homepage
repositoryhttps://gitlab.com/Toru3/tzgrep
max_upload_size
id684406
Cargo.toml error:TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
(Toru3)

documentation

README

.Tar.Gz GREP

Why I made this tool

$ time tar xf test_data.tar -O | rg hogeP # fast but no filename
gRRay4bho5P4hZZWvBDCX50cX2fJAyLNhogePvGaFWwaPFdmi3Y8zvJai2OLpQ13+tZB2zm8KbAI

real	0m1.392s
user	0m0.828s
sys	0m1.513s
$ tar xf test_data.tar '--to-command=grep --label=$TAR_FILENAME -H hogeP; true' # extremely slow
test_data/863227.txt:gRRay4bho5P4hZZWvBDCX50cX2fJAyLNhogePvGaFWwaPFdmi3Y8zvJai2OLpQ13+tZB2zm8KbAI

real	24m21.333s
user	20m9.365s
sys	4m32.069s
$ tzgrep hogeP test_data.tar # very fast with filename
test_data/863227.txt:gRRay4bho5P4hZZWvBDCX50cX2fJAyLNhogePvGaFWwaPFdmi3Y8zvJai2OLpQ13+tZB2zm8KbAI

real	0m0.644s
user	0m0.475s
sys	0m0.168s

Usage

$ tzgrep --help
grep tar.gz

Usage: tzgrep [OPTIONS] <PATTERN> [FILE]

Arguments:
  <PATTERN>
          search pattern [regular expression](https://crates.io/crates/regex)

  [FILE]
          search target. If not presented read from stdin.
          
          .tar, .tar.gz, .tar.bz2, .tar.xz, .tar.zst are supported

Options:
  -n, --line-number
          print line number with output lines

  -F, --fixed-string
          Asuume search pattern to be fixed string

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version
Commit count: 20

cargo fmt