Search CDROM
$ cdrw -l # list a system's CD or DVD writers
$ cdrw -M # get the blanking status and table of contents
Data CD and DVD
-i Specifies the image file for creating data CDs or DVDs. When creating data CDs, cdrw uses the Track-At-Once (TAO) mode of writing. If you don't specify this option, cdrw reads data from standard input.
cdrw can create single-session data DVDs on DVD or DVD-RW devices using images generated from mkisofs. When making data DVDs, cdrw uses Disk-At-Once (DAO) mode of writing, which closes the media when writing is completed and prevents any further sessions from being added. The image should be prepared in advance when writing an image to the DVD media since DAO mode requires that the size of the image be known in advance.
$ cdrw -i /data/iso_image #Creating a data CD or DVD
$ cdrw -S -I /data/iso-image
$ cdrw -d c1t6d0s2 -i /data/iso-image
# priocntl -e -p 60 [–c RT] cdrw -i /data/iso-image
$ mkisofs -r /data 2>/dev/null ; cdrw -i -p 24 # Create a CD from the directory /data.
$ cdrw -O -i /data/iso-image # Creating multi-session disk, recording without closing disk
Additional sessions can be added to an open disk by creating an image with mkisofs using the session start and next writable address reported by cdrw.
$ cdrw -M
Track No. Type Start address
----------+-------+------------
1 Data 0
Leadout Data 166564
Last session start address: 162140
Next writable address: 173464
$ mkisofs -o /tmp/image2 -r -C 0,173464 -M /dev/rdsk/c0t2d0s2 /data/foo
Audio CDs
-a Creates an audio disk. 1 to 99 audio-file name specified. The maximum audio data that can be written to the media by default is 74 minutes, unless -C is specified. All of the audio files should be in a supported audio format. Currently approved formats are:
· sun .au files with data in Red Book CDDA form
· wav .wav files with data in Red Book CDDA form
· cda .cda files having raw CD audio data
· Aur .aur files having raw CD data in big-endian byte order
If no audio format is specified, cdrw tries to identify 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 is assumed to be the audio file type for all the files specified. Also, using the -c option closes the session after writing the audio tracks. Therefore, the tracks to be written should be specified in a single command line.
$ cdrw -a song1.wav song2.wav song3.wav song4.wav
Copying CDs
-c Copies a CD. cdrw can be used to copy single session data CD-ROMs audio CDs. When copying a CD, cdrw looks for a specified source device. If no source device is specified when using the -c option, the current CD writer is assumed to be the source. cdrw extracts the track or tracks into a temporary file and looks for a blank writable CD-R/RW media inthe current CD writer. If no media is found, insert a blank writable CD media in the current CD writer. If the default temporary directory does not have enough space, an alternate directory can be specified by using the -m option.
$ cdrw -c [-m /tmp ] [-s src-device]
$ cdrw -c -p 56 –S -s cdrom1
Erasing CD-RW or DVD-RW
-b Blanks CD-RW or DVD-RW media. Users have to erase the CD-RW media before it can be rewritten.
· session Erases the last session.
· fast Minimally erases the media.
· all Erases the entire media.
$ cdrw -b fast
The session erasing type is used, cdrw erases the last session. If there is only one session recorded on the CD-RW (for example, a data or audio CD-RW created by this tool), then session erasing only erases the portion that is recorded, leaving behind a blank disk. This is faster than erasing the entire media. For DVD media, using the -b session erases the whole media.
The fast erasing type minimally erases the entire media by removing the PMA and TOC of the first session. It does not erase the user data and subsequent tracks on the media, but the media is treated as if it were a blank disk. If a complete erase is of the media is necessary, use the all option.
The all erasing type should be used if it is a multisession disk, the last session is not closed, or disk status is unknown, and you want to erase the disk. With this type oferasing, cdrw erases the entire disk.
DVD media does not support erasing. To re-use DVD media, simply write a new image onto the media. cdrw formats and overwrites the existing media automatically.
Extracting Audio
-T Audio format to use for extracting audio files or for reading audio files for audio CD creation. The audio-type can be sun, wav, cda, or aur.
-x Extracts audio data from an audio track.
$ cdrw -x -T wav 1 ~/song1.wav # Extract audio track 1 to ~/song1.wav.
Other Option
-d /dev/rdsk/c0t6d0s0 cdrom cdrom0
-C Uses stated media capacity. Without this option, cdrw uses a default value for writable CD media, which is 74 minutes for an audio CD, 681984000 bytes for a data CD, or 4.7 Gbytes for a DVD.
-L Closes the disk. This operation can only be done on CD-RW media.
-O Keeps the disk open. cdrw closes the session, but it keeps the disk open so that another session can be added later on to create a multi-session disk.
-m Uses an alternate temporary directory.
-p Sets the CD writing speed. For example, -p 4
-s Specifies the source device for copying a CD or DVD.
-S Simulation mode. In this mode, cdrw operates with the drive laser turned off.
-v Verbose mode.
Sunday, December 9, 2007
CDRW Command
Posted by wihok at 11:41 AM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment