---
name: "freq"
section: "1plan9"
platform: "linux"
package: "9base"
version: "1:6-14"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/freq"
---

# freq(1plan9)

print histogram of character frequencies

## NAME

freq - print histogram of character frequencies

## SYNOPSIS

**freq** \[ **-dxocr** \] \[ *file ...* \]

## DESCRIPTION

*Freq* reads the given files (default standard input) and prints histograms of the character frequencies. By default, *freq* counts each byte as a character; under the **-r** option it instead counts UTF sequences, that is, runes.

Each non-zero entry of the table is printed preceded by the byte value, in decimal, octal, hex, and Unicode character (if printable). If any options are given, the **-d**, **-x**, **-o**, **-c** flags specify a subset of value formats: decimal, hex, octal, and character, respectively.

## SOURCE

**/src/cmd/freq.c**

## SEE ALSO

*utf*(7), [*wc*(1)](/wc/1.md)
