dd is a very useful command under Linux/UNIX. It is used to copy a file with a block of the specified size and perform the specified conversion at the same time as copying, so it can be used to test the sequential read and write capabilities of the hard disk. You can write files and you can write raw devices.
dd syntax
-------------------------------------------------- -------
Functional Description: Read, convert and output data.
Syntax: dd [bs=][cbs=][conv=][count=][ibs=][if= ][obs=][of=][seek=][skip=][--help][--version]
Additional explanation: dd can read data from standard input or file, convert data according to the specified format, and then output to file, device or standard output.
Parameters:
Bs= Set ibs (input) and obs (output) to the specified number of bytes.
Cbs= When converting, only the specified number of bytes is converted at a time.
Conv= Specifies how the file is converted.
Count= Reads only the specified number of blocks.
Ibs= The number of bytes per read.
If= Read from file.
Obs= The number of bytes per output.
Of= Output to file.
Seek= Skips the specified number of blocks at the beginning of output.
Skip= Skips the specified number of blocks at the beginning of reading.
--help help.
--version Displays version information.
Detailed dd common parameters
-------------------------------------------------- -------
If=xxx reads from xxx, such as if=/dev/zero, the device provides 0 infinitely (does not generate read disk IO)
Of=xxx Write to xxx, you can write a file, you can write a bare device. Such as of=/dev/null, "black hole", it is equivalent to a write-only file. All content written to it will be lost forever. (Do not generate write disk IO)
Bs=8k The size of each read or write, that is, the size of a block.
Count=xxx The total number of read and write blocks.