size(1)

size1

Display object file segment sizes (text, data and bss)

Usage

size [-tw] [file ...]

Overview

size displays the text, data and bss segment sizes of the specified file(s) in bytes (in decimal), and the sum of the three segments (in decimal and hexadecimal). If a library (archive) is given, size displays the segment sizes for each object archive member. If no file is specified, size attempts to report on the file a.out.

The options are as follows:

-t

At the end of the output print a total of the sizes of all the object files processed.

-w

Warn about non-object archive members. Normally, size will silently ignore all archive members which are not object files.

Releases

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

  1. 2.1–2.3
  2. 2.4–2.5
  3. 2.6
  4. 2.7–2.8
  5. 2.9
  6. 3.0–3.3
  7. 3.4
  8. 3.5–3.6
  9. 3.7–4.1
  10. 4.2–5.4
  11. 5.5–6.6
  12. 6.7–7.0
  13. 7.1–8.0

-t since OpenBSD 3.5; -w since OpenBSD 3.5.

--format until OpenBSD 3.4; --help until OpenBSD 3.4; --radix until OpenBSD 3.4; --target until OpenBSD 3.4; --version until OpenBSD 3.4; -A until OpenBSD 3.4; -B until OpenBSD 3.4; -V until OpenBSD 3.4; -d until OpenBSD 3.4; -o until OpenBSD 3.4; -x until OpenBSD 3.4.

History

A size command appeared in Version 3 AT&T UNIX.

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