ZEEK-CUT(1)
π ZEEK-CUT(1) π
okay bestie, so this is zeek-cut, part of the User Commands squad. it's giving "tiny tool, huge main character energy." let's get into it π¦
β¨ NAME β¨
zeek-cut β parse Zeek logs π
πΈ SYNOPSIS πΈ
zeek-cut [options] [columns]
π DESCRIPTION π
so basically: you pipe some ASCII Zeek logs into standard input, you tell it which columns you want, and it spits those columns right back out to standard output. that's it. that's the vibe. β¨
if you don't name any fields at all? no stress, it selects all of them. and by default, zeek-cut does not include format header blocks in the output. nope, not doing that unless you ask. π
now, how do you ask for columns? you give a list of field names, separated by spaces. and here's the slay part: the order you give them in is the order they come out. so if you're feeling chaotic and want to shuffle things around, zeek-cut is literally your reordering bestie. π
π¨ important, no cap: the ASCII Zeek logs you feed in on standard input must have intact format header blocks. like, they need them. zeek-cut uses that info to correctly interpret the log file format. can't do the math without the numbers, you know? π
and here's the flex β zeek-cut can also handle the concatenation of multiple ASCII log files that have different column layouts. yeah. multiple logs, different shapes, one pipe. iconic. π«Ά
π OPTIONS π
-cβ include the first format header block in the output. just the one. baby steps. β¨-Cβ include all format header blocks in the output. go big or go home. π₯-mβ same as-c(first format header block, hello) but in minimal view. cute and compact. π-Mβ same as-C(all the format header blocks) but in minimal view. maximal content, minimal styling. the duality. π-dβ convert time values into human-readable format. because raw timestamps are not it. π°οΈ-D<fmt>β like-d, but you get to specify the format for time. peepstrftime(3)for the syntax, iykyk. π§-F<ofs>β sets a different output field separator character. default separator not your thing? change it. π«-hβ show help. when in doubt, ask for help. we love a self-aware icon. πββοΈ-nβ print all fields except the ones you specified. yes, it's the inverse. yes, it's still valid. no, it's not a typo. π-uβ like-d, but print timestamps in UTC instead of local time. timezone girlies rise. π-U<fmt>β like-D, but print timestamps in UTC instead of local time. same energy, different clock. β°
π ENVIRONMENT π
ZEEK_CUT_TIMEFMTβ for the time conversion options-dor-u, you can set the format string by setting this environment variable instead. set it once, vibe forever. β¨
π EXAMPLES π
output three columns and convert time values:
cat conn.log | zeek-cut -d ts id.orig_h id.orig_p
output all columns and convert time values with a custom format string:
cat conn.log | zeek-cut -D "%Y-%m-%d %H:%M:%S"
compressed logs must be uncompressed with another utility:
zcat conn.log.gz | zeek-cut
π reminder bestie:zeek-cutdoes not unzip anything for you.zcat(or your decompressor of choice) handles that first, then you hand it over. don't @ me.
π SEE ALSO π
strftime(3) β go read it, it's where the format syntax lives π«Ά
π AUTHOR π
zeek-cut was written by The Zeek Project <info@zeek.org>. legends, honestly. π
and that's the whole page, bestie!! this one's from zeek-cut, dated November 2014, sitting pretty in section 1 of the manual. go forth and parse. periodt. π
β¨π¦
π¦ where this page comes from
- fedora 43: zeek-core 6.0.4-1.fc41 Β· BSD-3-Clause AND Apache-2.0 AND BSL-1.0 AND ISC AND LGPL-3.0-or-later AND MIT AND NCSA
- fedora 44: zeek-core 6.0.4-1.fc41 Β· BSD-3-Clause AND Apache-2.0 AND BSL-1.0 AND ISC AND LGPL-3.0-or-later AND MIT AND NCSA
- nixos 26.05: zeek 8.0.10
- nixpkgs unstable: zeek 8.2.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms