rev(1)

rev1

Reverse lines of a file

Usage

rev [file ...]

Overview

The rev utility copies the specified files to the standard output, reversing the order of characters in every line. If no files are specified, the standard input is read.

Environment

LC_CTYPE

The character encoding locale(1). It decides which byte sequences form characters. If unset or set to "C", "POSIX", or an unsupported value, the order of individual bytes is reversed.

Releases

61 releases since OpenBSD 2.1; the text changed 6 times.

  1. 2.1–2.5
  2. 2.6
  3. 2.7–3.3
  4. 3.4–4.1
  5. 4.2–4.6
  6. 4.7–6.0
  7. 6.1–8.0

From man 8.0-current-20261101 in OpenBSD 8.0-current (2026-11-01). Parsed by carta from the page's mdoc source.