---
name: "rev"
section: "1"
platform: "openbsd"
package: "man"
version: "8.0-current-20261101"
release: "OpenBSD 8.0-current (2026-11-01)"
platforms: ["linux", "freebsd", "openbsd", "macos"]
url: "https://new.carta.tech/rev"
---

# rev(1)

reverse lines of a file

## NAME

**rev** – reverse lines of a file

## SYNOPSIS

**rev** \[*file ...*\]

## DESCRIPTION

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)](/locale/1.md). 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.

## SEE ALSO

[cat(1)](/cat/1.md), [cut(1)](/cut/1.md)
