In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article focuses on "how to use the dd command under the linux system". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to use the dd command under the linux system.
Function: copy the specified input file to the specified output file, and the format can be converted during the copying process. You can use this command to achieve the function of the diskcopy command under DOS. First use the dd command to write the data on the floppy disk into a storage file of the hard disk, and then write the storage file to the second floppy disk to complete the function of diskcopy. It is important to note that the hosting files on the hard disk should be deleted with the rm command. The system uses standard input files and standard output files by default.
Syntax: dd [options]
The code is as follows:
If = enter the file (or device name).
Of = output file (or device name).
Ibs = bytes reads bytes bytes at a time, that is, the number of bytes read into the buffer.
Skip = blocks skips the ibs*blocks block at the beginning of the read-in buffer.
Obs = bytes writes bytes bytes at a time, that is, the number of bytes written to the buffer.
Bs = bytes also sets the number of bytes in the read / write buffer (equal to setting ibs and obs).
Cbs = byte converts bytes bytes at once.
Count=blocks copies only input blocks blocks.
Conv = ASCII converts EBCDIC codes to ASCIL codes.
Conv = ebcdic converts ASCIL codes to EBCDIC codes.
Conv = ibm converts ASCIL codes to alternate EBCDIC codes.
Conv = block converts variable bits to fixed characters.
Conv = ublock converts a fixed position into a variable position.
Conv = ucase converts letters from lowercase to uppercase.
Conv = lcase converts letters from uppercase to lowercase.
Conv = notrunc does not truncate the output file.
Conv = swab swaps each pair of input bytes.
Conv = noerror does not stop processing when there is an error.
Conv = sync adjusts the size of each input record to the size of ibs (filled with NUL).
Example 1: to copy the contents of one floppy disk to another, use / tmp as a temporary storage area. Insert the source disk into the drive and enter the following command:
The code is as follows:
$dd if = / dev/fd0 of = / tmp/tmpfile
After the copy is complete, remove the source disk from the drive, insert the target disk, and enter the command:
The code is as follows:
$dd if = / tmp/tmpfile of = / dev/fd0
After the floppy disk copy is complete, the temporary files should be deleted:
The code is as follows:
$rm / tmp/tmpfile
Example 2: write net.i to the floppy disk and set the number of read / write buffers.
(note: the contents of the floppy disk will be completely overwritten)
The code is as follows:
$dd if = net.i of = / dev/fd0 bs = 16384
Example 3: copy the file sfile to the file dfile.
The code is as follows:
$dd if=sfile of=dfile
At this point, I believe you have a deeper understanding of "how to use the dd command under the linux system". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.