How to use the command wodim (with examples)

How to use the command wodim (with examples)

The wodim command, also known as cdrecord on some systems, is used for recording data to CDs or DVDs. It provides various options to perform different tasks, such as burning audio-only discs or burning files to a disc. However, it is important to note that some invocations of wodim can cause destructive actions, such as erasing all the data on a disc.

Use case 1: Display optical drives available to wodim

Code:

wodim --devices

Motivation: This use case allows you to determine the optical drives that are available and accessible to wodim. It helps in identifying the specific drive that you want to use for recording data.

Explanation:

  • --devices: This option lists all available optical drives to wodim.

Example output:

wodim: Overview of accessible drives (1 found) :
-------------------------------------------------------------------------
 0  dev='/dev/cdrom'    rwrw-- :
    vendor='QEMU    '
    product='QEMU     '
    revision='2.5+'
    args=''
-------------------------------------------------------------------------

Use case 2: Record an audio-only disc

Code:

wodim dev=/dev/optical_drive -audio track*.cdaudio

Motivation: This use case allows you to record an audio-only disc using wodim. It is useful when you want to create audio CDs from audio tracks in the .cdaudio format.

Explanation:

  • dev=/dev/optical_drive: Specifies the optical drive where the disc will be recorded. Replace /dev/optical_drive with the actual device name.
  • -audio: Indicates that the disc being recorded is an audio-only disc.
  • track*.cdaudio: Specifies the audio tracks in the .cdaudio format that will be burned to the disc. The * represents the track number(s) you want to include.

Example output:

wodim: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.
Device type    : Removable CD-ROM
Version        : 5
Response Format: 2
Capabilities   : 
Vendor_info    : 'QEMU    '
Identification : 'QEMU     '
Revision       : '2.5+'
Device seems to be: Generic qemu CD-ROM
Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
Driver flags   : SWABAUDIO BURNFREE 
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
wodim: No such file or directory. 
wodim: Cannot open SCSI driver!
For possible targets try 'wodim --devices' or 'wodim -scanbus'.
For possible transport specifiers try 'wodim dev=help'.
For IDE/ATAPI devices configuration, see the file README.ATAPI.setup from
the wodim documentation.

Use case 3: Burn a file to a disc, ejecting the disc once done

Code:

wodim -eject dev=/dev/optical_drive -data file.iso

Motivation: This use case allows you to burn a file to a disc using wodim and automatically eject the disc once the burning process is complete. It ensures that you can easily remove the disc without manually opening the drive.

Explanation:

  • -eject: Instructs wodim to eject the disc after the burning process is complete.
  • dev=/dev/optical_drive: Specifies the optical drive where the disc will be recorded. Replace /dev/optical_drive with the actual device name.
  • -data: Indicates that the disc being recorded is a data disc.
  • file.iso: Specifies the file in the .iso format that will be burned to the disc.

Example output:

wodim: Overview of accessible drives (1 found) :
-------------------------------------------------------------------------
 0  dev='/dev/cdrom'    rwrw-- :
    vendor='QEMU    '
    product='QEMU     '
    revision='2.5+'
    args=''
-------------------------------------------------------------------------
wodim: No write mode specified.
wodim: Assuming -tao mode.
wodim: Future versions of wodim may have different drive dependent defaults.
TOC Type: 1 = CD-ROM
wodim: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.
Device type    : Removable CD-ROM
Version        : 5
Response Format: 2
Capabilities   : 
Vendor_info    : 'QEMU    '
Identification : 'QEMU     '
Revision       : '2.5+'
Device seems to be: Generic qemu CD-ROM
Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
Driver flags   : SWABAUDIO BURNFREE 
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
wodim: No such file or directory. 
wodim: Cannot open SCSI driver!
For possible targets try 'wodim --devices' or 'wodim -scanbus'.
For possible transport specifiers try 'wodim dev=help'.
For IDE/ATAPI devices configuration, see the file README.ATAPI.setup from
the wodim documentation.

Use case 4: Burn a file to the disc in an optical drive, potentially writing to multiple discs in succession

Code:

wodim -tao dev=/dev/optical_drive -data file.iso

Motivation: This use case allows you to burn a file to the disc in an optical drive using wodim in Track-At-Once (TAO) mode. TAO mode enables writing data to multiple discs in succession, which can be useful for creating multiple copies of the same data.

Explanation:

  • -tao: Specifies the recording mode as Track-At-Once (TAO), which allows writing data to multiple discs in succession.
  • dev=/dev/optical_drive: Specifies the optical drive where the disc will be recorded. Replace /dev/optical_drive with the actual device name.
  • -data: Indicates that the disc being recorded is a data disc.
  • file.iso: Specifies the file in the .iso format that will be burned to the disc.

Example output:

wodim: Overview of accessible drives (1 found) :
-------------------------------------------------------------------------
 0  dev='/dev/cdrom'    rwrw-- :
    vendor='QEMU    '
    product='QEMU     '
    revision='2.5+'
    args=''
-------------------------------------------------------------------------
wodim: No write mode specified.
wodim: Assuming -tao mode.
wodim: Future versions of wodim may have different drive dependent defaults.
TOC Type: 1 = CD-ROM
wodim: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.
Device type    : Removable CD-ROM
Version        : 5
Response Format: 2
Capabilities   : 
Vendor_info    : 'QEMU    '
Identification : 'QEMU     '
Revision       : '2.5+'
Device seems to be: Generic qemu CD-ROM
Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
Driver flags   : SWABAUDIO BURNFREE 
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
wodim: No such file or directory. 
wodim: Cannot open SCSI driver!
For possible targets try 'wodim --devices' or 'wodim -scanbus'.
For possible transport specifiers try 'wodim dev=help'.
For IDE/ATAPI devices configuration, see the file README.ATAPI.setup from
the wodim documentation.

Conclusion:

The wodim command is a versatile tool for recording data to CDs or DVDs. With the provided use cases, you can display available optical drives, burn audio-only discs, burn files to a disc, and use Track-At-Once mode for potentially writing to multiple discs in succession. Remember to double-check the device names and file formats in your own usage of the wodim command.

Related Posts

How to use the command "ghc" (with examples)

How to use the command "ghc" (with examples)

The Glasgow Haskell Compiler (ghc) is a tool used to compile and link Haskell source files.

Read More
Using cppclean (with examples)

Using cppclean (with examples)

1: Run in a project’s directory CODE: cppclean path/to/project MOTIVATION: Running cppclean on a project’s directory allows you to analyze the entire project and identify any unused code.

Read More
Using the `cipher` command (with examples)

Using the `cipher` command (with examples)

The cipher command is a powerful tool in Windows that allows users to display or alter the encryption of directories and files on NTFS volumes.

Read More