Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is dd command limiting dummy file size at 2GB? [closed]

I'm just curious about why the dd command is limiting the size of a dummy file to about 2.1GB

[aesteban@localhost ~]$ dd if=/dev/zero of=test.img bs=3G count=1
0+1 records in
0+1 records out
2147479552 bytes (2.1 GB) copied, 10.0044 s, 215 MB/s
[aesteban@localhost ~]$ ls -sh test.img 
2.0G test.img

I seen above I specified 3GB but the file is only 2.1GB, any ideas ?

Thanks

like image 520
angelcool.net Avatar asked Jan 29 '26 14:01

angelcool.net


1 Answers

I can suppose that that's a limitation of dd buffer size, just try to split it by setting bs=1Gb count=3

like image 93
Sergey Sosnin Avatar answered Jan 31 '26 05:01

Sergey Sosnin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!