Viewing the contents of an ISO image from the command line

I had several ISO images lying around on my desktop, and decided to go through each image and purge the ones I no longer need. Several image files weren’t labeled, so I decided to fire up the isoinfo utility to figure out what the mystery ISO images were. The first image I checked was a Solaris 10 update 4 DVD, as you can see from the “Volume id” field in the isoinfo “-d” (print primary volume descriptor) output:

$ isoinfo -d -i 1.iso |more

CD-ROM is in ISO 9660 format
System id: Solaris
Volume id: SOL_10_807_X86
Volume set id: 
Publisher id: 
Data preparer id: 
Application id: MKISOFS ISO 9660/HFS FILESYSTEM BUILDER & CDRECORD CD-R/DVD CRE
ATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING
Copyright File id: 
Abstract File id: 
Bibliographic File id: 
Volume set size is: 1
Volume set sequence number is: 1
Logical block size is: 2048
Volume size is: 1327235
El Torito VD version 1 found, boot catalog is in sector 42171
NO Joliet present
Rock Ridge signatures version 1 found
Eltorito validation header:
    Hid 1
    Arch 0 (x86)
    ID ''
    Key 55 AA
    Eltorito defaultboot header:
        Bootid 88 (bootable)
        Boot media 0 (No Emulation Boot)
        Load segment 0
        Sys type 0
        Nsect 4
        Bootoff A4BC 42172

To double check that the volume descriptor was correct, I also ran isoinfo with the “-l” (list files) option to generate a file listing of each ISO image:

$ isoinfo -l -i 1.iso |more

Directory listing of /
d---------   0    0    0            4096 Aug 16 2007 [    632 02]  . 
d---------   0    0    0            4096 Aug 16 2007 [    632 02]  .. 
----------   0    0    0            2048 Aug 16 2007 [  42171 00]  .CATALOG 
----------   0    0    0              92 Jun 12 2007 [  42231 00]  .CDTOC 
d---------   0    0    0            2048 Aug 16 2007 [  42045 02]  .INSTALL 
----------   0    0    0               0 Aug 16 2007 [  42173 00]  .INSTALL_CONFIG 
----------   0    0    0             419 Jun 12 2007 [  42232 00]  .SLICEMAPFILE 
d---------   0    0    0            2048 Aug 16 2007 [  42041 02]  BOOT 
----------   0    0    0            6128 Jun 12 2007 [  42233 00]  COPYRIGHT 
----------   0    0    0             257 Aug 16 2007 [  42236 00]  INSTALLER 
----------   0    0    0          459760 Jun 12 2007 [  42237 00]  JDS-THIRDPARTYLICENSEREADME 
d---------   0    0    0            2048 Aug 16 2007 [    634 02]  LICENSE 
d---------   0    0    0            2048 Aug 16 2007 [    635 02]  SOLARIS_10 
----------   0    0    0              19 Jun 12 2007 [  42462 00]  _VOLUME.INF 
----------   0    0    0              21 Aug 16 2007 [  42463 00]  _VOLUME_INF.2 
----------   0    0    0              21 Aug 16 2007 [  42464 00]  _VOLUME_INF.3 
----------   0    0    0              21 Aug 16 2007 [  42465 00]  _VOLUME_INF.4 
----------   0    0    0              21 Aug 16 2007 [  42466 00]  _VOLUME_INF.5 

With this information in hand, I added useful labels to the mystery images. Nice!

3 thoughts on “Viewing the contents of an ISO image from the command line”

Leave a Reply

Your email address will not be published. Required fields are marked *