LinuxCommandLibrary

readom

Read data from optical media (CD/DVD/BD)

SYNOPSIS

readom [options] infile offset count

PARAMETERS

infile
    The input file or block device to read from.

offset
    The starting offset in bytes from which to begin reading.

count
    The number of bytes to read.

-help
    Display help information.

-version
    Display version information.

DESCRIPTION

The readom command is a utility used for reading blocks of data from a file or block device at a specified offset. It is often employed in scenarios where you need to extract a particular section of a file without reading the entire file into memory. This makes it useful for tasks like examining disk images, recovering data from damaged media, or inspecting specific data structures within a file.

readom differs from dd in several important respects, including the default byte swapping and the fact that readom displays the bytes read from the file. Unlike tools like head or tail, readom lets you choose the starting position, amount, and byte order to read from any kind of file. It offers functionalities more focused on low-level data manipulation and is primarily intended for specialized data recovery and analysis tasks.

Note: Incorrect use of readom, especially with block devices, can potentially lead to data loss. It's essential to understand the offset and size parameters correctly before executing the command.

CAVEATS

Using incorrect offset or count values can lead to reading unintended data or causing errors. It is important to verify input values and be careful with block devices.

EXAMPLES

To read 1024 bytes from 'myfile.dat' starting at offset 512:
readom myfile.dat 512 1024

This will display the hex representation of the 1024 bytes read from the file on standard output.

SEE ALSO

dd(1), head(1), tail(1), od(1)

Copied to clipboard