---
name: "rev"
section: "1"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
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.

## EXAMPLES

Reverse the text from stdin:

```
$ echo -e "reverse \t these\ntwo lines" | rev
eseht    esrever
senil owt
```
