realpath(1)

realpath1

Print the canonicalized absolute pathname

Usage

realpath [-q] file

Overview

The realpath utility uses realpath(3) to resolve all symbolic links, extra “/” characters and references to /./ and /../ in file, and prints the absolute pathname on standard output.

The options are as follows:

-q

Do not print errors.

Exit status

The realpath utility exits 0 on success, and >0 if an error occurs.

Releases

Unchanged in 11 releases since OpenBSD 7.1.

  1. 7.1–8.0

History

The realpath utility first appeared in OpenBSD 7.1.

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