LinuxCommandLibrary

isosize

Determine the size of an ISO image

TLDR

Display the size of an ISO file

$ isosize [path/to/file.iso]
copy

Display the block count and block size of an ISO file
$ isosize [[-x|--sectors]] [path/to/file.iso]
copy

Display the size of an ISO file divided by a given number (only usable when --sectors is not given)
$ isosize [[-d|--divisor]] [number] [path/to/file.iso]
copy

SYNOPSIS

isosize [options] [file ...]

PARAMETERS

-d N, --debug=N
    Set debug level to N (0-10, default 0)

-h, --help
    Display short help text and exit

-l, --list
    List sizes of all directories

-m media, --media=media
    Media type: cdr or dvdr (default cdr)

-p, --path-table
    Include path table size in calculation

-r, --rock
    Account for Rock Ridge extensions

-u, --udf
    Account for UDF filesystem

-V, --volume
    Include volume descriptor size

-x, --joliet
    Account for Joliet extensions

DESCRIPTION

isosize is a command-line utility from the cdrtools suite designed to compute the size of an ISO 9660 filesystem image in blocks. It analyzes the structure of an ISO image file (or stdin) and outputs the total number of 2048-byte sectors required, which is essential for determining if an image fits on CD-R, DVD-R, or other optical media.

Primarily used in CD/DVD mastering workflows, isosize helps verify image sizes before burning, especially for bootable media or multi-session discs. It supports key extensions like Rock Ridge (for Unix permissions), Joliet (for Windows long filenames), and UDF (universal disk format), allowing accurate size calculations that reflect real-world burning scenarios.

By default, it assumes CD-R media (2048-byte blocks). Users specify an image file as an argument; multiple files can be processed. Output is a single number (blocks) unless -l lists directory sizes. Debug levels aid troubleshooting parse errors.

This tool complements genisoimage (or mkisofs), enabling pre-burn checks without full image recreation. It's lightweight, fast, and invaluable for ensuring media compatibility without trial burns.

CAVEATS

Assumes 2048-byte blocks for CDs; use -m dvdr for DVDs (2048-byte mode). Does not support all ISO variants; may fail on corrupted images.

EXIT STATUS

0 on success, 1 on error (e.g., parse failure).

STANDARDS

Implements ISO 9660 (ECMA-119), with extensions per Rock Ridge (RRIP), Joliet, UDF.

HISTORY

Part of cdrtools suite by Jörg Schilling since 1993; maintained for Linux/Unix CD/DVD tools. Replaced older cdsize in some distros.

SEE ALSO

genisoimage(1), mkisofs(1), cdrecord(1), isoinfo(1)

Copied to clipboard