What is the meaning of dd if=/dev/zero of=? Detailed use of the dd command under Linux

  
 First, the interpretation of the dd command
dd: copy a file with a block of the specified size, and perform the specified conversion at the same time as the copy. Note: If the specified number ends with the following characters, multiply the corresponding number: b=512; c=1; k=1024; w=2Parameter comment:
1. if=File name: Enter the file name, which defaults to standard input. That is, specify the source file. < if=input file >2. of=filename: Output file name, default is standard output. That is, specify the destination file. < of=output file >3. ibs=bytes: Read bytes bytes at a time, that is, specify a block size of bytes. Obs=bytes: Outputs bytes bytes at a time, that is, specifies a block size of bytes. Bs=bytes: Set the read/output block size to bytes at the same time. 4. cbs=bytes: Convert bytes bytes at a time, that is, specify the conversion buffer size. 5. skip=blocks: Skips the blocks from the beginning of the input file before starting the copy. 6. seek=blocks: Skips the blocks from the beginning of the output file before starting the copy. Note: It is usually only valid when the output file is a disk or tape, that is, it is valid when backing up to disk or tape. 7. count=blocks: Only blocks blocks are copied, the block size is equal to the number of bytes specified by ibs. 8. conv=conversion: Convert the file with the specified parameters. Ascii: convert ebcdic to ascii ebcdic: convert ascii to ebcdic ibm: convert ascii to alternate ebcdic block: convert each line to cbs, and fill the unblock with spaces: make each line length cbs, insufficient space Fill lcase: convert uppercase characters to lowercase characters ucase: convert lowercase characters to uppercase characters swab: swap each pair of bytes of input noerror: do not stop when not in error: not truncating the output file sync: fill each input block to Ibs bytes, the insufficient part is filled with null (NUL) characters. Second, dd application examples
1.
Back up the local
/dev/hdb
disk to
/dev /hdd
#dd if=/dev/hdb of=/dev/hdd2.
will
/dev/hdb
full data backup
image
file
#dd if=/dev/hdb of=/root/image3.
to restore the backup file to the specified path To the specified disk
#dd if=/root/image of=/dev/hdb4.
Backup
/dev/hdb
Full data And use the
gzip
tool to compress and save to the specified path
#dd if=/dev/hdb
Copyright © Windows knowledge All Rights Reserved