In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to use the Linux operating system command dd, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Dd is a very useful command under Linux/UNIX, which is used to copy a file with a block of the specified size and perform the specified conversion at the same time.
The main options for dd:
If the place of the specified number ends with the following characters multiplied by the corresponding number:
Baked 512, cased 1, kappa 1024, walled 2, xm=number m
If=file
Enter the file name, which defaults to standard input.
Of=file
Output file name, which defaults to standard output.
Ibs=bytes
Read bytes bytes at a time (that is, a block size is bytes bytes).
Obs=bytes
Write bytes bytes at a time (that is, a block size is bytes bytes).
Bs=bytes
At the same time, the size of the read and write block is set to bytes, which can replace ibs and obs.
Cbs=bytes
Convert bytes bytes at a time, that is, convert the buffer size.
Skip=blocks
Skip blocks blocks from the beginning of the input file before you start copying.
Seek=blocks
Skip blocks blocks from the beginning of the output file before you start copying. (usually valid only if the output file is a disk or tape)
Count=blocks
Only blocks blocks are copied, and the block size is equal to the number of bytes specified by ibs.
Conv=conversion [, conversion...]
Converts the file with the specified parameters.
Conversion parameters:
Ascii converts EBCDIC to ASCII.
Ebcdic converts ASCII to EBCDIC.
Ibm converts ASCII to alternate EBCDIC.
Block converts each line to a record of length cbs, with gaps filled in.
Unblock
Make the length of each line cbs, and fill the insufficient parts with blanks.
Lcase converts uppercase characters to lowercase characters.
Ucase converts lowercase characters to uppercase characters.
Swab swaps each pair of bytes entered. Unlike the
Unix dd, this works when an odd number of
Bytes are read. If the input file contains
An odd number of bytes, the last byte is
Simply copied (since there is nothing to
Swap it with).
Noerror
Don't stop when something goes wrong.
Notrunc
The output file is not truncated.
Sync fills each input block into ibs bytes, and the deficiency is filled with NUL characters.
Because the dd command allows binary reading and writing, it is particularly suitable for input / output on raw physical devices. For example, you can use the following command to create an image file for a floppy disk:
Dd if=/dev/fd0 of=disk.img bs=1440k
Interestingly, this image file can be read by HD-Copy, Winimage and other tools. Another example is to save the first 512 bytes of * hard drives as a file:
Dd if=/dev/hda of=disk.mbr bs=512 count=1
The above is all the contents of the article "Linux operating system commands how to use dd". 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!
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.