0

I'm able to fill 1MB file with specific character like this:

> tr '\0' '#' </dev/zero | dd of=1MB.bin bs=1k count=1024
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0139671 s, 75.1 MB/s

However if I use larger block size it ends-up with 64kB file:

> tr '\0' '#' </dev/zero | dd of=1MB.bin bs=1M count=1
0+1 records in
0+1 records out
65536 bytes (66 kB, 64 KiB) copied, 0.000240126 s, 273 MB/s

Can anyone explain this behavior? Is it a buffering problem? I see it is not connected with /dev/zero special file. The same result with regular file.

ardabro
  • 159
  • 6

0 Answers0