LinuxCommandLibrary

readcd

Read data from optical discs (CD/DVD)

TLDR

Read a cd and copy it to a file

$ readcd dev=[/dev/srX] f=[path/to/file.iso]
copy

SYNOPSIS

readcd [ options ] device

PARAMETERS

-f file
    Specifies the output file. If not specified, output is written to stdout.

dev=device
    Specifies the CD-ROM device to use (e.g., /dev/cdrom).

speed=speed
    Sets the reading speed. Lower speeds can improve read accuracy.

sectors=number
    Specifies the number of sectors to read.

start=sector
    Sets the starting sector to read from.

-isosize
    Print the size of the ISO-9660 image on the CD. Can be used to find the size before extraction.

-data
    Read data sectors. Needed for data CDs.

-audio
    Read audio sectors. Needed for audio CDs.

-v
    Verbose output. Provides more detailed information about the reading process.

-vv
    More Verbose output. Provides even more detailed information about the reading process.

DESCRIPTION

readcd is a command-line utility for reading and extracting data from CD-ROMs. It is a versatile tool capable of reading various CD formats, including audio CDs, data CDs, and mixed-mode CDs. It provides functionalities to extract tracks as audio files, create ISO images of data CDs, perform sector-level reads, and verify data integrity. readcd is often used in scripting environments for automated CD ripping or archiving tasks.

The command offers fine-grained control over the reading process, allowing users to specify the starting sector, number of sectors to read, output file format, and other relevant parameters. readcd is a powerful alternative to GUI-based CD ripping programs, especially useful for server environments or systems where a graphical interface is unavailable.

CAVEATS

readcd requires appropriate device permissions to access the CD-ROM drive. Ensure the user running the command has read access to the device file. Errors during reading can occur due to disc imperfections or drive limitations.

EXAMPLES

Extract all audio tracks from CD to wav files:
readcd dev=/dev/cdrom -audio -track 1 -f track1.wav
readcd dev=/dev/cdrom -audio -track 2 -f track2.wav


Create an ISO image of a data CD:
readcd dev=/dev/cdrom -data -isosizedetermine ISO size
readcd dev=/dev/cdrom -data start=0 sectors=isosize -f cdimage.iso

HISTORY

readcd has been a part of the cdrtools suite, providing a low-level interface for CD-ROM access. It evolved alongside CD-R/RW technology, adapting to various CD formats and features. readcd is still actively maintained within the cdrtools project, ensuring compatibility with modern systems and drives.

SEE ALSO

mkisofs(8), cdrecord(1)

Copied to clipboard