FREQ(1)

๐Ÿ“ฆ
version 0_git20260208 ยท 2 versions
, in alpine 3.24, arch rolling, nixos 26.05, nixpkgs unstable

freq(1) ๐Ÿ’… print histogram of character frequencies

General Commands Manual, section 1, bestie โ€” folding the header in right here so it doesn't have to show up as a boring copied line. โœจ

๐ŸŒธ NAME ๐ŸŒธ

freq โ€” print histogram of character frequencies ๐Ÿ’–

โœจ SYNOPSIS โœจ

freq [ -dxocr ] [ file ...  ]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

Okay so freq reads the files you pass it โ€” and if you don't pass any, it defaults to standard input, periodt โ€” then prints histograms of the character frequencies. It's giving data visualization but make it terminal.

By default, freq counts each byte as a character. Under the -r option, it instead counts UTF sequences, that is, runes. Slay, we love a multibyte-aware icon.

Each non-zero entry of the table is printed preceded by the byte value, in decimal, octal, hex, and Unicode character (if printable). Like every nonzero little guy gets its full value-format lineup. If any options are given, the -d, -x, -o, -c flags specify a subset of value formats: decimal, hex, octal, and character, respectively. No cap.

Here's the flag rundown, bestie:

  • -d โ€” decimal value format ๐Ÿงฎ
  • -x โ€” hex value format ๐Ÿ”ฅ
  • -o โ€” octal value format ๐Ÿ™
  • -c โ€” character value format ๐ŸŽ€
  • -r โ€” count UTF sequences (runes) instead of bytes, i.e. the rune mode โœจ

๐Ÿ’œ SOURCE ๐Ÿ’œ

/src/cmd/freq.c

๐Ÿซถ SEE ALSO ๐Ÿซถ

utf(7), wc(1)


And that's the whole page, bestie โ€” freq(1) from General Commands Manual. The source is up in SOURCE, and the footer has no version/date to spill, just the manual title doing its iconic little outro. Stay freq-y and fabulous ๐Ÿ’–๐ŸŽ€๐Ÿ’