Explanation of dd commands for linux disk management commands

Source: Internet
Author: User

In the use of dd commands in linux disk management commands, the system administrator wants to know the functions of dd commands. Many users also know about most linux disk management commands, discuss the dd command with you. After reading this article, I believe you can get a satisfactory answer. Disk Quota: the problem is that they did not express their desire to get Disk Quota Management tools at the same time.

Dd command:
Function: Copies the specified input file to the specified output file, and supports format conversion during the copy process. You can use this command to implement the diskcopy command in DOS. Use the dd command to write the data on the floppy disk as a storage file on the hard disk, and then write the storage file to the second disk to complete the diskcopy function. Note that you should delete the storage file on the hard disk with the rm command. Standard input files and standard output files are used by default.

Syntax: dd [Option]
◆ If = input file or device name ).
◆ Of = output file or device name ).
◆ Ibs = bytes: the number of bytes read from the buffer zone.
◆ Skip = blocks skip the ibs * blocks block at the beginning of the read buffer.
◆ Obs = bytes: the number of bytes written to the buffer zone.
◆ Bs = bytes: set the number of bytes in the read/write buffer at the same time to set ibs and obs ).
◆ Cbs = byte: converts bytes at a time.
◆ Count = blocks: only copy the input blocks block.
◆ Conv = ASCII converts the EBCDIC code to the ASCIl code.
◆ Conv = ebcdic converts an ASCIl code to an EBCDIC code.
◆ Conv = ibm converts an ASCIl code to an alternateEBCDIC code.
◆ Conv = block converts a variable bit to a fixed character.
◆ Conv = ublock converts a fixed bit to a variable bit.
◆ Conv = ucase converts lowercase letters to uppercase letters.
◆ Conv = lcase converts uppercase letters to lowercase letters.
◆ Conv = notrunc: the output file is not truncated.
◆ Conv = swab exchange each input byte.
◆ Conv = do not stop processing when noerror occurs.
◆ Conv = sync adjusts the size of each input record to the ibs size and fills it with NUL ).

Example 1: copy the content of a floppy disk to another floppy disk and use/tmp as the temporary storage area.
Insert the source disk into the drive and enter the following command: $ ddif =/dev/fd0of =/tmp/tmpfile

After the copy is complete, extract the source disk from the drive and insert the target disk. Enter the following command:
$ Ddif =/tmp/tmpfileof =/dev/fd0

After the floppy disk is copied, delete the temporary file:
$ Rm/tmp/tmpfile

Example 2: Write the net. I file to a floppy disk and set the number of read/write buffers. Note: The content in the floppy disk will be completely overwritten)
$ Ddif = net. iof =/dev/fd0bs = 16384

Example 3: copy the sfile to the dfile.
$ Ddif = sfileof = dfile

The above describes the linux disk management commands, which may be useful to you.

  1. IBM and Microsoft advocate the switch of enterprise users to Linux
  2. Advantages of linux: Numerous hardware support features
  3. The essence of the sunflower collection explains linux advantages and features
  4. Linux compression and packaging method 3: bzip2, bzcat command
  5. How to attach and detach a linux Network Device

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.