Contained WithinFind More DocumentationFeatured Support Resources | Download this book in PDF (5130 KB)
cdrw(1)NAME | SYNOPSIS | DESCRIPTION | OPTIONS | EXAMPLES | ATTRIBUTES | SEE ALSO | NOTES NAME
SYNOPSIS
cdrw -a [-vSCO] [-d device] [-p speed] [-T audio-type] audio-file1 [audio-file2…] cdrw -x [-v] [-d device] [-T audio-type] track-number out-file cdrw -c [-vSC] [-d device] [-p speed] [-m tmp-dir] [-s src-device] cdrw -b [-v] [-d device] all| session cdrw -M [-v] [-d device] cdrw -l [-v] cdrw -h DESCRIPTION
The cdrw command provides the ability to create data and audio CDs. It also provides the ability to extract audio tracks from an audio CD. Any MMC-compliant CD-R or CD-RW drive can be used with cdrw. cdrw will search for a CD writer device connected to the system, unless the user specifies a device with the -d option. If it finds a single such writer device, it will use that as the default CD writer device for the command. When more than one CD writer is connected to the system, use the -d option to indicate which device is desired. The device name can be specified in one of the following ways: /dev/rdsk/cNtNdNsN, cNtNdNsN, cNtNdN, or a symbolic name used by volume manager, such as cdrom or cdrom1. The -l option will provide a list of CD writers. For instructions on adding a USB-mass-storage-class-compliant CD-RW to your system, see scsa2usb(7D). Creating Data CDsWhen creating data CDs, cdrw uses the track-at-once mode of writing. With the -i option, the user will specify a file that contains the data to write on CD media. In the absence of such a file, cdrw will read data from standard input. In either case, the data will typically first have been prepared by using the mkisofs(1M) command to convert the file and file information into the High Sierra format used on CDs. See the examples that include use of this command. Creating Audio CDsFor creating an audio CD, using the -a option, single or multiple audio files can be specified. All of the audio files should be in the supported audio formats. Currently approved formats are: If no audio format is specified, cdrw tries to understand the audio file format based on the file extension. The case of the characters in the extension is ignored. If a format is specified using the -T option, it will be assumed as the audio file type for all the files specified. Also, -cdrw will close the session after writing the audio tracks. Therefore, the tracks to be written should be specified in a single command line. Extracting Audiocdrw can also be used for extracting audio data from an audio CD with the -x option. The CD should have tracks in Red Book CDDA form. By default, the output format is based on the file extension. A user can specify a sun, wav, cda, or aur output format using the -T option. Copying CDscdrw can be used to copy single session data CD-ROMs and Red Book audio CDs. For copying a CD, cdrw looks for a specified source device. If no source device is specified when using the -c option, the current CD writing device is assumed to be the source. cdrw will extract the track or tracks into a temporary file and will look for a blank writable CD-R/RW media in the current CD writing device. If no such media is found, the user will be asked to insert a blank writable CD media in the current CD writing device. If enough space is not available in the default temporary directory, an alternative directory can be specified using the -m option. Erasing CD-RW MediaUsers have to erase the CD-RW media before it can be re-written. With the -b option, the following flavors of erasing are currently supported: If the session erasing type is used, cdrw will erase the last session. If there is only one session recorded on the CD-RW (for example, a data/audio CD-RW created by this tool), then session erasing is useful as it will only erase the portion that is recorded, leaving behind a blank disk. This is faster than erasing the entire media. The all erasing type should be used if it is a multisession disk, or the last session is not closed, or disk status is unknown, and the user wishes to erase the disk. With this type of erase, cdrw will erase the entire disk. Checking device-list or media-statusThe user can get a list of CD writing devices currently present in the system with the -l option. Also, for a particular media, the user can get the blanking status and table of contents through the -M option. The -M option also prints information about the last session start address and the next writable address. This information, along with the -O option, can be used to create multisession CDs. Please refer to mkisofs(1M) for more information. OPTIONS
The following options are supported: EXAMPLESExample 1 Creating a data CD
Example 2 Creating a CD from a directoryThis example creates a CD from the directory tree /home/foo:
Example 3 Extracting an audio track numberThis example extracts audio track number 1 to /home/foo/song1.wav:
Example 4 Using wav filesThis example creates an audio CD from wav files on disk:
Example 5 Erasing a CD-RW mediaThis example erases a CD-RW media in a CD-RW drive:
Example 6 Creating a data CD with multiple drivesThis example creates a data CD on a system with multiple CD-R/RW drives:
Example 7 Checking data delivery rateThis example checks if the system can provide data to a CD-RW drive at a rate sufficient for the write operation:
Example 8 Running at a higher priorityThis example runs cdrw at a higher priority (for root user only):
Example 9 Creating a multi-session diskCreate the first session image using mkisofs(1M) and record it onto the disk without closing the disk:
Additional sessions can be added to an open disk by creating an image with mkisofs(1M) using the session start and next writable address reported by cdrw.
ATTRIBUTESSee attributes(5) for descriptions of the following attributes:
SEE ALSOaudioconvert(1), mkisofs(1M), priocntl(1), attributes(5), rbac(5), scsa2usb(7D), sd(7D) NOTESThe CD writing process requires data to be supplied at a constant rate to the drive. It is advised to keep I/O activity to a minimum and shut down the related applications while writing CDs. When making copies or extracting audio tracks, it is better to use an MMC compliant source CD-ROM drive. The CD writing device can be used for this purpose. Before writing a CD, ensure that the media is blank by using the -M option and use the -S simulation mode to test the system to make sure it can provide data at the required rate. In case the system is not able to provide data at the required rate, try simulation with a slower write speed set through the -p option. Users can also try to run cdrw at a higher priority using the priocntl(1) command. The -p option is provided for users who are aware of the CD-R/RW drive and its capabilities to operate at different write speeds. Some commercially available drives handle the drive speed setting command differently, so use this option judiciously. Most commercially available drives allow writing beyond 74 minutes as long as the media has the capacity (such as 80–minute media). However, such capability of writing beyond 74 minutes might not be supported by the drive in use. If the drive being used supports such capability, then use the -C option to indicate that the tool should rely on the capacity indicated by the media. The cdrw command uses rbac(5) to control user access to the devices. By default, cdrw is accessible to all users but can be restricted to individual users. Please refer to "Administering CD-R/CD-RW devices" in the System Administration Guide: Basic Administration for more information. NAME | SYNOPSIS | DESCRIPTION | OPTIONS | EXAMPLES | ATTRIBUTES | SEE ALSO | NOTES |
|||||||||||||||