Operating System - HP-UX
1832592 Members
2867 Online
110043 Solutions
New Discussion

Re: MAke a list of CD rom diskContens

 
SOLVED
Go to solution
oscar munoz_1
Occasional Contributor

MAke a list of CD rom diskContens

How can I mount a cdrom disk and read the contents?
3 REPLIES 3
Bryan D. Quinn
Respected Contributor
Solution

Re: MAke a list of CD rom diskContens

Hello,

If you know your cdroms device file just do the following:

mount /dev/dsk/cXtXdX /some_directory

If you don't know the device file for your cdrom do an ioscan to determine:

ioscan -fnC disk

Just look for your cdrom device and note it's device file then mount it as above.

Hope this helps!
-Bryan
Bryan D. Quinn
Respected Contributor

Re: MAke a list of CD rom diskContens

Sorry, got ahead of myself.

After you have sucessfully mounted the cdrom, just cd into the directory and do an ll to list the files:

cd /some_directory

ll


-Bryan
Patrick Wallek
Honored Contributor

Re: MAke a list of CD rom diskContens

Assuming this is an HP-UX machine:

If /cdrom directory doesn't exist, create it.

# mkdir /cdrom

Determine the device file of your CDROM drive via ioscan:

# ioscan -kfnC disk

look for a CD or DVD in the description and make note of the /dev/dsk/c?t?d0 device file below the description line.

# mount -F cdfs -o ro /dev/dsk/c?t?d0 /cdrom

# cd /cdrom
# ls

To unmount the cdrom so you can eject it:

# cd /
# umount /cdrom