1

I'm new with this so bear with me...

I have this command :

tr '\\0' '\\377' < /dev/zero | dd bs=4096 count=1484095 of=/path/one

Output:

1+1484094 records in
1+1484094 records out
8412124 bytes transferred in 23.670 secs (355391 bytes/sec)

and it doesn't execute for the hole space , meaning bs*count bytes (6078853120 bytes). As you can see it just writes 8412124 bytes. I have added bs and count to fasten the operation.

Where is the issue?

3

1 Answer 1

0

As the comments have alluded to, when dd reads a block, it may get an incomplete read. It then writes this out to the destination, only it's incomplete, and so the block only contains partial data.

Basically, dd is not the tool you want to use here. It's rarely the tool to use anywhere, but it's usage is common simply because it's common.

It seems you want to read 6078853120 bytes, so just use head to do this.

tr '\\0' '\\377' < /dev/zero | head -c 6078853120 > /path/one

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .