Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Sep 2015 18:39:21 -0700
From:      Jim Long <list@museum.rain.com>
To:        freebsd-questions@freebsd.org
Subject:   Is xzgrep broken?
Message-ID:  <20150930013921.GA80620@ns.umpquanet.com>

next in thread | raw e-mail | index | archive | help
xzgrep seems to crap out very quickly when reading a large-ish file
containing compressed ASCII SQL data (834014732 bytes compressed).

# time xzgrep 9314517 /disk1/smbd_share/backup/Daily_backup-20150927-001000.sql.xz  | wc
       0       0       0

real    0m0.005s
user    0m0.011s
sys     0m0.001s

xzcat appears to do better:

# time xzcat /disk1/smbd_share/backup/Daily_backup-20150927-001000.sql.xz  | grep 9314517 | wc
      17  374475 17592746

real    4m0.654s
user    3m45.401s
sys     0m26.678s


# xz -l /disk1/smbd_share/backup/Daily_backup-20150927-001000.sql.xz
Strms  Blocks   Compressed Uncompressed  Ratio  Check   Filename
    1       1    795.4 MiB   8345.1 MiB  0.095  CRC64   /disk1/smbd_share/backup/Daily_backup-20150927-001000.sql.xz


Jim



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150930013921.GA80620>