Linux Command Directory


Linux in a Nutshell

This directory of Linux commands is from Linux in a Nutshell, 5th Edition.

Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.

Buy it now, or read it online on Safari Bookshelf.



cdrecord

cdrecord [general-options] dev=device [track-options] track1,track2...

Record data or audio compact discs. This program normally requires root access. It has a large number of options and settings. A number of useful examples can be found in the manpage.

General options

General option flags go directly after the cdrecord command. Options affecting the track arguments are placed after the device argument and before the track arguments themselves. The general options are:

--atip

Display the ATIP (Absolute Time In Pregroove) information for a disc. Only some drives allow you to read this information.

--blank=type

Erase data from a CD-RW in one of the following ways:

help

Display a possible list of blanking methods.

all

Erase all information on the disc. May take a long time.

fast

Perform a quick erase of the disc, erasing only the PMA, TOC, and pregap.

track

Blank a track.

unreserve

Unreserve a track previously marked as reserved.

trtail

Blank the tail of a track only.

unclose

Unclose the last session.

session

Blank the last session.

--checkdrive

Check to see if there are valid drivers for the current drive. Returns 0 if the drive is valid.

--dao

Disk-at-once mode. Works only with MMC drives that support non-raw session-at-once modes.

--debug=n, -d

Set the debug level to an integer (greater numbers are more verbose), or use multiple -d flags as with the -v and -V flags.

--driver=name

Lets you specify a driver for your system. Suggested for experts only. The special drivers cdr_simul and dvd_simul are used for simulation and profiling tests.

--driveropts=optlist

Specify a comma-separated list of driver options. To get a list of valid options, use driveropts=help and --checkdrive.

--dummy

Perform a dry run, doing all the steps of recording with the laser turned off. This will let you know whether the process is going to work.

--eject

Eject disc after recording. Some hardware may need to eject a disc after a dummy recording and before the actual recording.

--fix

Close ("fixate") the session, preventing future multisession recordings and allowing the disc to be played in standard audio CD players (some can also play a disc that has not been closed).

--force

Override errors if possible. May allow you to blank an otherwise broken CD-RW.

--fs=n

Set the fifo buffer size to n, in bytes. You may use k, m, s, or f to specify kilobytes, megabytes, or units of 2048 and 2352 bytes, respectively. The default is 4 MB.

--kdebug=n, --kd=n

Set the kernel's debug notification value to n during SCSI command execution. Works through the scg-driver.

--load

Load media and exit. Works with tray-loading mechanisms only.

--mcn=n

Set the Media Catalog Number to n.

--msinfo

Get multisession information from the CD. Used only with multisession discs onto which you can still record more sessions.

--multi

Set to record in multisession mode. Must be present on all sessions but the last one for a multisession disc.

--nofix

Do not close the disc after writing.

--reset

Attempt to reset the SCSI bus. Does not work on all systems.

-s, --silent

Silent mode. Do not print any SCSI error commands.

--speed=n

Set the speed to n, a multiple of the audio speed. Normally, cdrecord will get this from the CDR_SPEED environment variable. If your drive has trouble with higher numbers, try 0 as a value.

--timeout=n

Set the timeout to n seconds. Defaults to 40.

--toc

Display the table of contents for the CD currently in the drive. Works for CD-ROM, as well as CD-R and CD-RW drives.

--scanbus

Scan SCSI devices.

--useinfo

Use .inf files to override audio options set elsewhere.

-V

As with the -v, a verbose mode counter. However, this applies only to SCSI transport messages. This will slow down the application.

-v

Verbose mode. Use one v for each level of verbosity. -vv would be very verbose, and -vvv would be even more so.

--version

Print version information and exit.

The device argument

The device argument should be specified not as a file but as three integers that represent the bus, target, and logical unit, as in the cdrdao command. To check the options that are available, use the --scanbus option.

Track options and arguments

Track options may be mixed with track arguments, and normally apply to the track immediately after them or to all tracks after them. The track arguments themselves should be the files that you will be writing to the CD. Options are:

--audio

Write all tracks after this track in digital audio format (playable by standard CD players). If you do not use this flag or the --data flag, cdrecord will assume that .au and .wav files are to be recorded as raw audio and that all other files are data.

--cdi

Write subsequent tracks in CDI format.

--data

Record subsequent tracks as CD-ROM data. If you do not use this flag or the --audio flag, all files except for those that end in .wav or .au are assumed to be data.

--index=a,b,c

Set the index list for the next track. The values should be increasing comma-separated integers, starting with index 1 and counting in sectors (75ths of a second). For example, you could set three indices in a track with index=0,750,7500 and they would occur at the beginning of the track, after 10 seconds, and after 100 seconds.

--isosize

The size of the next track should match the size of the ISO-9660 filesystem. This is used when duplicating CDs or copying from raw-data filesystems.

--isrc=n

Set the International Standard Recording Number for the track argument following this option.

--mode2

Write all subsequent tracks in CD-ROM mode 2 format.

--nopad

Do not insert blank data between data tracks following this flag. This is the default behavior.

--pad

Insert 15 sectors of blank data padding between data tracks. Applies to all subsequent tracks or until you use the --nopad argument, and is overridden by the padsize=n argument.

--padsize=n

Insert n sectors of blank data padding after the next track. Applies only to the track immediately after it.

--swab

Declare that your data is in byte-swapped (little-endian) byte order. This is not normally necessary.

--tsize=n

Set the size of the next track. Useful only if you are recording from a raw disk for which cdrecord cannot determine the file size. If you are recording from an ISO 9660 filesystem, use the --isosize flag instead.

--xa1, --xa2

Write subsequent tracks in CD-ROM XA mode 1 or CD-ROM XA mode 2 format.


More Linux resources from O'Reilly >>

Popular Topics

Browse Books & Videos

International Sites

O'Reilly China O'Reilly Germany O'Reilly Japan