
isosize Command in Linux
The isosize command in Linux displays the length of an iso9660 filesystem. This filesystem is typically found in CD-ROM and DVD images.
The isosize command provides the length of the filesystem in bytes or sectors (blocks), helping determine the actual size of the filesystem within an ISO image file or a block device. This is useful for verifying disk image sizes, especially when dealing with large files or when the ISO image contains extra run-out sectors added during CD/DVD creation.
Table of Contents
Here is a comprehensive guide to the options available with the isosize command −
Syntax of isosize Command
The syntax of the Linux isosize command is as follows −
isosize [options] [file]
The [options] field is used to specify the options to change command behavior. The [file] field is used to specify the iso file.
isosize Command Options
The options of the isosize command are listed below −
Flags | Options | Description |
---|---|---|
-x | --sectors | Displays block count and block size in a human-readable format, using sectors as blocks |
-d number | --divisor number | Displays the ISO size in bytes divided by the specified number (If the number is the block size, the output will be the block count. Extra run-out sectors may cause the file to be slightly larger than the filesystem.) |
-h | --help | Displays help of command and exits |
-V | --version | Displays command version |
Examples of isosize Command in Linux
This section demonstrates the usage of the isosize command in Linux with examples −
Displaying the Size of an ISO Image
To check the size of an ISO image, use the isosize command with the image file name or path −
isosize file.iso

This output image shows that the ISO file is 356352 bytes in size.
Displaying the Size of an ISO Image in Sectors and Sector Size
To display the ISO image in sectors and sector size, use the -x or --sectors option −
isosize -x file.iso

The above output image shows that the ISO consists of 174 sectors, each 2,048 bytes. The total size is calculated as 174×2048=356352 bytes.
Dividing the Size of an ISO Image
Dividing the ISO size by a specified block size provides insights into the filesystem structure. It helps in compatibility checks and simplifies calculations related to storage media preparation. To divide the ISO image, use the -d or --divisor option with a number.
For example, to determine how many 2048-byte blocks an ISO file contains, use the following command −
isosize -d 2048 file.iso

The output image shows the ISO file contains 174 2048-byte sectors.
Note that extra run-out sectors may cause the file to be slightly larger than the filesystem.
Extra run-out blocks or sectors refer to additional space at the end of a disk that is not part of the data written to the disc but is included in the image file.
Displaying Help
To display help related to the command, use the -h or --help options −
isosize -h
Conclusion
The isosize command in Linux is a handy tool for determining the length of iso9660 filesystems, commonly used in CD-ROM and DVD images. It provides crucial information about filesystem sizes in bytes or sectors, verifying disk image sizes and understanding their structure.
With a simple syntax and various options, the isosize command allows for easy checking of ISO sizes, displaying them in a human-readable format, dividing sizes for compatibility checks, and accessing help information.
In this tutorial, we explained the isosize command, its syntax, options, and usage in Linux with examples.