PSU Mark
Eberly College of Science Math Dept
MD26 - Using CD-ROM Drives

Overview

To access data on a cd, do the following:
  1. Insert the cd in the cd-rom drive. It will automatically be mounted.
  2. Find out where the drive was mounted. The mount point will depend on the volume label of the cd.
  3. Access files as you would on a normal filesystem. The files cannot be written to, but otherwise they are accessible using the standard tools that you use for working with files under a given operating system.
  4. When you are done using the disk, eject/unmount the cd.

Solaris 10

You can use the df command to see a list of all mounted filesystems. In general, there will only be one mounted under /cdrom. For example:

    foo:~>df -k | grep cdrom
    /vol/dev/dsk/c0t1d0/fc-6i386disc1  692168  692168       0   100%    /cdrom/fc-6i386disc1

In the example above, the files on the cdrom are accessible as a filesystem under /cdrom/fc-6i386disc1.

To eject a cdrom, use the command eject.

Note: If a cd has been unmounted (by using the umount command) you can use the eject button on the cd-rom drive. However, if the cd is mounted, the eject button on the cd-rom drive will have no effect.

Note: you cannot eject a cdrom if the filesystem is busy. The most common reason why a filesystem is busy is because a program (usually a user's shell) is using a file or directory on the cdrom. The most common case is that a user has "cd'd" (changed working directory) to the cd. The first thing to do if you get a message about a busy filesystem when trying to eject a cd is to close any shells and programs that might be accessing/using the cdrom.

OS X

When you insert a cdrom into a cdrom drive on a machine running OS X, the cd is mounted under /Volumes. The mount point depends on the volume label of the cd that was inserted. It is usually obvious just by looking at the output of ls /Volumes.

In the default configuration, a finder window displaying the cd's contents will appear on your desktop.

To eject a cdrom under OS X, either drag the icon representing the cdrom on the desktop to the trashcan or press the cd eject button. It is the upper right hand button on a Mac keyboard and looks like a triangle on top of a horizontal line.

The comments about busy filesystems in the Solaris section apply to OS X.

Mathnet Footer Map
Mathnet Sitemap Search
Privacy and Legal Statements Validate HTML Validate CSS