Linux uses the dd command to create a file of a specific size.
Source: Internet
Author: User
In Linux, the simplest way to create a specific size file using the dd command is to use the dd command. DdifinputFileNameof & quot; outFileName & quot; bs & quot; block size & quot; count block count the block size can be measured in bytes (1... in Linux, the simplest way to create a specific size file using the dd command is to use the dd command. Dd if = "inputFileName" of = "outFileName" bs = "block size" count = "block quantity" the block size can be measured in bytes (1B)-c (2B) -w block (512B)-B kilobytes (1024B)-k MB (1024 K)-M GiB (1024 M)-G example: dd if =/dev/zero of = test. file bs = 1 M count = 10 create a 10 M file test in the current folder. the file content is 0/dev/zero, which is a character device and will continuously return 0 bytes (\ 0 ). if the input parameter (if) is not specified, the input is read from stdin by default. If no output parameter (of) is specified, stdout is output by default. You can also use the dd command to transmit a large amount of data to test the memory operation speed. $ Dd if =/dev/zero of =. /testmm. file bs = 10 M count = 10 records 10 + 0 read records 10 + 0 write 104857600 bytes (105 MB) copied, 0.577581 seconds, 182 MB/second $ ll-h | grep 'testmm. file '-rw-r --. 1 itudu 100 M July 16 18:14 testmm. file type: General file:-directory file: d character device: c block device: B link file: l socket file: S Channel file: the read, write, and execute permissions for the p Directory. meaning: read permission: allows reading the list of files and subdirectories in the directory. write permission: Allows you to create and delete files or subdirectories in the directory. execute permission: you can access files and subdirectories in the directory.
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.