Move everything from /var/adm to /var/log
[unleashed.git] / share / man / man1 / cdrw.1
blob74133c469810a494420815719b3eb8c7afd0b08e
1 '\" te
2 .\" Copyright (c) 2008, Sun Microsystems, Inc. All rights reserved.
3 .\" Copyright 2012 Marcel Telka <marcel@telka.sk>
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH CDRW 1 "May 13, 2017"
8 .SH NAME
9 cdrw \- CD read and write
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fBcdrw\fR \fB-i\fR [\fB-vSCO\fR] [\fB-d\fR \fIdevice\fR] [\fB-p\fR \fIspeed\fR] [\fIimage-file\fR]
14 .fi
16 .LP
17 .nf
18 \fBcdrw\fR \fB-a\fR [\fB-vSCO\fR] [\fB-d\fR \fIdevice\fR] [\fB-p\fR \fIspeed\fR] [\fB-T\fR \fIaudio-type\fR] \fIaudio-file1\fR
19      [\fIaudio-file2\fR]...
20 .fi
22 .LP
23 .nf
24 \fBcdrw\fR \fB-x\fR [\fB-v\fR] [\fB-d\fR \fIdevice\fR] [\fB-T\fR \fIaudio-type\fR] \fItrack-number\fR \fIout-file\fR
25 .fi
27 .LP
28 .nf
29 \fBcdrw\fR \fB-c\fR [\fB-vSC\fR] [\fB-d\fR \fIdevice\fR] [\fB-p\fR \fIspeed\fR] [\fB-m\fR \fItmp-dir\fR]
30      [\fB-s\fR \fIsrc-device\fR]
31 .fi
33 .LP
34 .nf
35 \fBcdrw\fR \fB-b\fR [\fB-v\fR] [\fB-d\fR \fIdevice\fR] all | session | fast
36 .fi
38 .LP
39 .nf
40 \fBcdrw\fR \fB-L\fR [\fB-v\fR] [\fB-d\fR \fIdevice\fR]
41 .fi
43 .LP
44 .nf
45 \fBcdrw\fR \fB-M\fR [\fB-v\fR] [\fB-d\fR \fIdevice\fR]
46 .fi
48 .LP
49 .nf
50 \fBcdrw\fR \fB-l\fR [\fB-v\fR]
51 .fi
53 .LP
54 .nf
55 \fBcdrw\fR \fB-h\fR
56 .fi
58 .SH DESCRIPTION
59 .LP
60 The \fBcdrw\fR command provides the ability to create data and audio CDs. This
61 command also provides the ability to extract audio tracks from an audio CD and
62 to create data DVDs. The CD or DVD device must be MMC-compliant to create a CD
63 or DVD with the \fBcdrw\fR command.
64 .sp
65 .LP
66 \fBcdrw\fR searches for a CD or DVD writer connected to the system, unless you
67 specify a device with the \fB-d\fR option. If \fBcdrw\fR finds a single such
68 device, it uses that device as the default CD or DVD writer for the command.
69 .sp
70 .LP
71 When more than one CD or DVD writer is connected to the system, use the
72 \fB-d\fR option to indicate which device is desired. The device name can be
73 specified in one of the following ways: /dev/rdsk/cNtNdNsN, cNtNdNsN, cNtNdN,
74 or a name used by volume manager, such as \fBcdrom\fR or \fBcdrom1\fR. Using
75 the \fB-l\fR option provides a list of CD or DVD writers.
76 .sp
77 .LP
78 For instructions on adding a USB-mass-storage-class-compliant CD-RW or DVD-RW
79 device to your system, see \fBscsa2usb\fR(7D).
80 .SS "Creating Data CDs"
81 .LP
82 When creating data CDs, \fBcdrw\fR uses the Track-At-Once mode of writing. Use
83 the \fB-i\fR option to specify a file that contains the data to write on CD
84 media. If you don't specify this option, \fBcdrw\fR reads data from standard
85 input.
86 .sp
87 .LP
88 In either case, the data is typically prepared by using the \fBmkisofs\fR
89 command to convert the file and file information into the ISO 9660 format
90 used on CDs. See the examples that include use of this command.
91 .SS "Creating Data DVDs"
92 .LP
93 \fBcdrw\fR can create single-session data DVDs on DVD+RW or DVD-RW devices
94 using images generated from \fBmkisofs\fR. These disks can be mounted as HSFS
95 file systems. When making data DVDs, \fBcdrw\fR uses Disk-At-Once (DAO) mode of
96 writing, which closes the media when writing is completed and prevents any
97 further sessions from being added. The image should be prepared in advance when
98 writing an image to the DVD media since DAO mode requires that the size of the
99 image be known in advance.
100 .SS "Creating Audio CDs"
102 Use the \fB-a\fR option to create an audio CD. Single or multiple audio files
103 can be specified with this option. All of the audio files should be in a
104 supported audio format. Currently approved formats are:
106 .ne 2
108 \fBsun\fR
110 .RS 7n
111 Sun .au files with data in Red Book CDDA form
115 .ne 2
117 \fBwav\fR
119 .RS 7n
120 RIFF (.wav) files with data in Red Book CDDA form
124 .ne 2
126 \fBcda\fR
128 .RS 7n
129 \&.cda files having raw CD audio data (that is, 16 bit PCM stereo at 44.1 KHz
130 sample rate in little-endian byte order)
134 .ne 2
136 \fBaur\fR
138 .RS 7n
139 \&.aur files having raw CD data in big-endian byte order
144 If no audio format is specified, \fBcdrw\fR tries to identify the audio file
145 format based on the file extension. The case of the characters in the extension
146 is ignored. If a format is specified using the \fB-T\fR option, it is assumed
147 to be the audio file type for all the files specified. Also, using the \fB-c\fR
148 option closes the session after writing the audio tracks. Therefore, the tracks
149 to be written should be specified in a single command line.
150 .SS "Extracting Audio"
152 \fBcdrw\fR can also be used for extracting audio data from an audio CD with the
153 \fB-x\fR option. The CD should have tracks in Red Book CDDA form. By default,
154 the output format is based on the file extension. A user can specify a
155 \fBsun\fR, \fBwav\fR, \fBcda\fR, or \fBaur\fR output format with the \fB-T\fR
156 option.
157 .SS "Copying CDs"
159 \fBcdrw\fR can be used to copy single session data CD-ROMs and Red Book audio
160 CDs. When copying a CD, \fBcdrw\fR looks for a specified source device. If no
161 source device is specified when using the \fB-c\fR option, the current CD
162 writer is assumed to be the source. \fBcdrw\fR extracts the track or tracks
163 into a temporary file and looks for a blank writable CD-R/RW media in the
164 current CD writer. If no media is found, insert a blank writable CD media in
165 the current CD writer. If the default temporary directory does not have enough
166 space, an alternate directory can be specified by using the \fB-m\fR option.
167 .SS "Erasing CD-RW or DVD-RW Media"
169 Users have to erase the CD-RW media before it can be rewritten. With the
170 \fB-b\fR option, the following flavors of erasing are currently supported:
172 .ne 2
174 \fB\fBsession\fR\fR
176 .RS 11n
177 Erases the last session.
181 .ne 2
183 \fB\fBfast\fR\fR
185 .RS 11n
186 Minimally erases the media.
190 .ne 2
192 \fB\fBall\fR\fR
194 .RS 11n
195 Erases the entire media.
200 If the session erasing type is used, \fBcdrw\fR erases the last session. If
201 there is only one session recorded on the CD-RW (for example, a data or audio
202 CD-RW created by this tool), then session erasing only erases the portion that
203 is recorded, leaving behind a blank disk. This is faster than erasing the
204 entire media. For DVD media, using the \fB-b session\fR erases the whole media.
207 The \fBfast\fR erasing type minimally erases the entire media by removing the
208 \fBPMA\fR and \fBTOC\fR of the first session. It does not erase the user data
209 and subsequent tracks on the media, but the media is treated as if it were a
210 blank disk. If a complete erase is of the media is necessary, use the \fBall\fR
211 option.
214 The \fBall\fR erasing type should be used if it is a multisession disk, the
215 last session is not closed, or disk status is unknown, and you want to erase
216 the disk. With this type of erasing, \fBcdrw\fR erases the entire disk.
219 DVD+RW media does not support erasing. To re-use DVD+RW media, simply write a
220 new image onto the media. \fBcdrw\fR formats and overwrites the existing media
221 automatically.
222 .SS "Checking device-list or media-status"
224 You can list a system's CD or DVD writers by using the \fB-l\fR option. Also,
225 for a particular media, you can get the blanking status and table of contents
226 by using the \fB-M\fR option. The \fB-M\fR option also prints information about
227 the last session's start address and the next writable address. This
228 information, along with the \fB-O\fR option, can be used to create multisession
229 CDs. Refer to the \fBmkisofs\fR(8) man page for more information.
230 .SH OPTIONS
232 The following options are supported:
234 .ne 2
236 \fB\fB-a\fR\fR
238 .RS 6n
239 Creates an audio disk. At least one \fIaudio-file\fR name must be specified. A
240 CD can not have more than 99 audio tracks, so no more than 99 audio files can
241 be specified.
245 .ne 2
247 \fB\fB-b\fR\fR
249 .RS 6n
250 Blanks CD-RW or DVD-RW media. The type of erasing must be specified by the
251 \fBall\fR, \fBfast\fR, or \fBsession\fR argument. DVD+RW media does not support
252 blanking, but can be rewritten without the need for blanking.
256 .ne 2
258 \fB\fB-c\fR\fR
260 .RS 6n
261 Copies a CD. If no other argument is specified, the default CD writing device
262 is assumed to be the source device as well. In this case, the copy operation
263 reads the source media into a temporary directory and prompts you to place a
264 blank media into the drive for the copy operation to proceed.
268 .ne 2
270 \fB\fB-C\fR\fR
272 .RS 6n
273 This option is obsolete.
275 This option used to cause \fBcdrw\fR to query the drive to determine media
276 capacity.  This is now the default behavior.
280 .ne 2
282 \fB\fB-d\fR\fR
284 .RS 6n
285 Specifies the CD or DVD writing device.
289 .ne 2
291 \fB\fB-h\fR\fR
293 .RS 6n
294 Help. Prints usage message.
298 .ne 2
300 \fB\fB-i\fR\fR
302 .RS 6n
303 Specifies the image file for creating data CDs or DVDs. The file size should be
304 less than what can be written on the media. Also, consider having the file
305 locally available instead of having the file on an NFS-mounted file system. The
306 CD writing process expects data to be available continuously without
307 interruptions.
311 .ne 2
313 \fB\fB-l\fR\fR
315 .RS 6n
316 Lists all the CD or DVD writers available on the system.
320 .ne 2
322 \fB\fB-L\fR\fR
324 .RS 6n
325 Closes the disk. If the media was left in an open state after the last write
326 operation, it is closed to prevent any further writing. This operation can only
327 be done on re-writable CD-RW media.
331 .ne 2
333 \fB\fB-m\fR\fR
335 .RS 6n
336 Uses an alternate temporary directory instead of the default temporary
337 directory for storing track data while copying a CD or DVD. An alternate
338 temporary directory might be required because the amount of data on a CD can be
339 huge. For example, the amount of data can be as much as 800 Mbytes for an 80
340 minute audio CD and 4.7 Gbytes for a DVD. The default temporary directory might
341 not have that much space available.
345 .ne 2
347 \fB\fB-M\fR\fR
349 .RS 6n
350 Reports media status. \fBcdrw\fR reports if the media is blank or not, its
351 table of contents, the last session's start address, and the next writable
352 address if the disk is open. DVD+RW does not support erasing and always has
353 some content on the media.
357 .ne 2
359 \fB\fB-O\fR\fR
361 .RS 6n
362 Keeps the disk open. \fBcdrw\fR closes the session, but it keeps the disk open
363 so that another session can be added later on to create a multisession disk.
367 .ne 2
369 \fB\fB-p\fR\fR
371 .RS 6n
372 Sets the CD writing speed. For example, \fB-p\fR \fB4\fR sets the speed to 4X.
373 If this option is not specified, \fBcdrw\fR uses the default speed of the CD
374 writer. If this option is specified, \fBcdrw\fR tries to set the drive write
375 speed to this value, but there is no guarantee of the actual speed that is used
376 by the drive.
380 .ne 2
382 \fB\fB-s\fR\fR
384 .RS 6n
385 Specifies the source device for copying a CD or DVD.
389 .ne 2
391 \fB\fB-S\fR\fR
393 .RS 6n
394 Simulation mode. In this mode, \fBcdrw\fR operates with the drive laser turned
395 off, so nothing is written to the media. Use this option to verify if the
396 system can provide data at a rate good enough for CD writing.
398 CD-R, CD-RW (not MRW formatted), DVD-R, and DVD-RW media support simulation
399 mode (\fB-S\fR). DVD-RAM, DVD+R, DVD+RW, any MRW-formatted media, and some
400 others do not support simulation mode (\fB-S\fR).
404 .ne 2
406 \fB\fB-T\fR\fR
408 .RS 6n
409 Audio format to use for extracting audio files or for reading audio files for
410 audio CD creation. The \fIaudio-type\fR can be \fBsun\fR, \fBwav\fR, \fBcda\fR,
411 or \fBaur\fR.
415 .ne 2
417 \fB\fB-v\fR\fR
419 .RS 6n
420 Verbose mode.
424 .ne 2
426 \fB\fB-x\fR\fR
428 .RS 6n
429 Extracts audio data from an audio track.
432 .SH EXAMPLES
434 \fBExample 1 \fRCreating a Data CD or DVD
436 .in +2
438 example% \fBcdrw -i /local/iso_image\fR
440 .in -2
444 \fBExample 2 \fRCreating a CD or DVD from a Directory
447 This example shows how to create a CD or DVD from the directory tree
448 \fB/home/foo\fR.
451 .in +2
453 example% \fBmkisofs -r /home/foo 2>/dev/null | cdrw -i -p 1\fR
455 .in -2
459 \fBExample 3 \fRExtracting an Audio Track Number
462 This example shows how to extract audio track number \fB1\fR to
463 \fB/home/foo/song1.wav\fR.
466 .in +2
468 example% \fBcdrw -x -T wav 1 /home/foo/song1.wav\fR
470 .in -2
474 \fBExample 4 \fRUsing \fBwav\fR Files
477 This example shows how to create an audio CD from \fBwav\fR files on disk.
480 .in +2
482 example% \fBcdrw -a song1.wav song2.wav song3.wav song4.wav\fR
484 .in -2
488 \fBExample 5 \fRErasing CD-RW or DVD-RW Media
491 This example shows how to erase rewritable media.
494 .in +2
496 example% \fBcdrw -b all\fR
498 .in -2
502 \fBExample 6 \fRCreating a Data CD or DVD with Multiple Drives
505 This example shows how to create a data CD or DVD on a system with multiple CD,
506 DVD-R, or DVD-RW drives.
509 .in +2
511 example% \fBcdrw -d c1t6d0s2 -i /home/foo/iso-image\fR
513 .in -2
517 \fBExample 7 \fRChecking Data Delivery Rate
520 This example shows how to verify that the system can provide data to a CD-RW or
521 a DVD drive at a rate sufficient for the write operation.
524 .in +2
526 example% \fBcdrw -S -i /home/foo/iso-image\fR
528 .in -2
532 \fBExample 8 \fRRunning at a Higher Priority
535 This example shows how to run \fBcdrw\fR at a higher priority (for root user
536 only).
539 .in +2
541 example# \fBpriocntl -e -p 60 cdrw -i /home/foo/iso-image\fR
543 .in -2
547 \fBExample 9 \fRCreating a Multi-session Disk
550 This examples shows how to create the first session image by using
551 \fBmkisofs\fR and recording it onto the disk without closing the disk.
554 .in +2
556 example% \fBcdrw -O -i /home/foo/iso-image\fR
558 .in -2
563 Additional sessions can be added to an open disk by creating an image with
564 \fBmkisofs\fR using the session start and next writable address reported by
565 \fBcdrw\fR.
568 .in +2
570 example% \fBcdrw -M\fR
572 Track No. |Type    |Start address
573 ----------+--------+-------------
574  1        |Data    | 0
575 Leadout   |Data    | 166564
577 Last session start address: 162140
578 Next writable address: 173464
580 .in -2
584 .in +2
586 example% \fBmkisofs -o /tmp/image2 -r -C 0,173464 -M \e
587    /dev/rdsk/c0t2d0s2 /home/foo\fR
589 .in -2
592 .SH SEE ALSO
594 \fBaudioconvert\fR(1), \fBpriocntl\fR(1), \fBpolicy.conf\fR(4),
595 \fBattributes\fR(5), \fBrbac\fR(5), \fBscsa2usb\fR(7D), \fBsd\fR(7D),
596 \fBmkisofs\fR(8)
599 \fISystem Administration Guide: Devices and File Systems\fR
600 .SH NOTES
602 The CD writing process requires data to be supplied at a constant rate to the
603 drive. Keep I/O activity to a minimum and shut down any related I/O
604 applications while writing CDs.
607 When making copies or extracting audio tracks, use an MMC compliant source
608 CD-ROM drive. The CD writer can be used for this purpose.
611 Before writing a CD, ensure that the media is blank by using the \fB-M\fR
612 option. You can use the \fB-S\fR simulation mode to test the system to make
613 sure it can provide data at the required rate. \fBcdrw\fR turns on buffer
614 underrun protection for drives that support it and recovers from most stalls.
615 If the system is not able to provide data at a constant rate or frequent
616 stalling occurs, you can lower the speed by using the \fB-p\fR option. You can
617 also try to run \fBcdrw\fR at a higher priority by using the \fBpriocntl\fR(1)
618 command.
621 If you know that the CD-R/RW drive can operate at different write speeds, use
622 the \fB-p\fR option. Some commercially available drives handle the drive speed
623 setting command differently, so use this option judiciously.
626 The \fBcdrw\fR command uses \fBrbac\fR(5) to control user access to the
627 devices. By default, \fBcdrw\fR is accessible to all users but can be
628 restricted to individual users. Refer to the \fISystem Administration Guide:
629 Devices and File Systems\fR for more information.
632 To burn CDs as a non-root user \fBhal\fR must be enabled and the user must be
633 on the console. \fBhal\fR, that is the \fBsvc:/system/hal\fR SMF service, is
634 enabled by default, therefore, typically this requires no special action.
637 The user must be logged onto the console. \fB/dev/console\fR is also correct.
638 Previously, users could log in remotely, for example, by using \fBtelnet\fR or
639 \fBssh\fR, and be able to burn CDs. This would work unless the administrator
640 had changed the default configuration to deny \fBsolaris.device.cdrw\fR
641 authorization. See \fBpolicy.conf\fR(4).