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

# what(1)

show what versions of object modules were used to construct a file

## NAME

**what** – show what versions of object modules were used to construct a file

## SYNOPSIS

**what** \[**-s**\] *file ...*

## DESCRIPTION

**what** reads each *file* and searches for sequences of either the form ‘$’ immediately followed by the system name (sysname) as defined by [uname(3)](/uname/3.md), or the form “@(#)” as inserted by the source code control system (SCCS).

When ‘$’ followed by the system name is encountered, **what** prints the remainder of the string up to a ‘$’ or any non-printable character.

When “@(#)” is encountered **what** prints the remainder of the string, up to a NUL, newline, double quote, backslash, or ‘\>’ character.

If the **-s** option is specified, only the first occurrence of an identification string in each file is printed.

## EXIT STATUS

The **what** utility exits with a return value of 0 if any identification strings were found, or with a return value of 1 otherwise.

## STANDARDS

The **what** utility is compliant with the X/Open System Interfaces option of the IEEE Std 1003.1-2008 (“POSIX.1”) specification.

Processing $sysname$ sequences is an OpenBSD extension.

## HISTORY

The **what** command first appeared in the SCCS package and was rewritten for 4.0BSD for licensing reasons.
