Get the App
SLTechnology News&Howtos  ›  Servers  › 

What is the use of the dd parameter

Shulou Source: shulou.com Published: 2022-06-01 06:36:32 10月02日 Update

This article mainly shows you "what is the use of dd parameters", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "what is the use of dd parameters" this article.

Dd powerful backup command

Command format: dd parameter

The parameters are:

Number of bs=bytes: set both ibs (input) and obs (output) to the specified size

Number of cbs=bytes: block size converted for block and unblock

Conv= parameters: specific parameters are as follows:

Ascii-> convert ebcdic to ascii

Ebcdi-> convert ascii to ebcdi

Ibm-> convert ascii to another ebcdic

Block-> change the newline to the number of spaces set by the cbs parameter

Unblock-> replace the number of spaces set by the cbs parameter with a newline symbol

Lcase-> change uppercase letters to lowercase

Ucase-> change lowercase letters to uppercase

Swab-> swap the output characters in groups of two

Noerror-> ignore the error and proceed

Notrunc-> do not truncate the output file

Sync-> fill the data block with NULL to make it the same size as the ibs

Number of count= blocks: the number of blocks that read only the specified data

Number of ibs=bytes: number of bytes per read

If= files: reading from fil

Obs=bytes parameter: number of bytes per output

Of= files: exporting to fil

Number of seek= blocks: the number of blocks skipped at the start of output

Number of skip= blocks: the number of blocks skipped at the start of reading

-- help: displays help information

-- version: displays version information

An example: convert the test.txt file to the following letters and write it to the newtest.txt file:

Dd if=test.txt of=newtest.txt conv=ucase

For example, back up the entire / dev/sda1:

Dd if=/dev/sda1 of=/back/myback

If you want to back up MBR, then:

Dd if=/dev/sda of=/home/allinster/mymbr bs=512 count=1

The above is all the content of the article "what is the use of dd parameters?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Parameters data files output content backup size letters articles help two information commands uppercase bytes lowercase number spaces spaces learning Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker vpn Shulou Tech Info Shulou Technology Huawei