Closed saj closed 3 months ago
@saj Which dd
and OS is this?
% type dd
dd is /bin/dd
% strings /bin/dd | grep BSD
$FreeBSD: src/bin/dd/position.c,v 1.20 2002/02/02 06:24:12 imp Exp $
0E$FreeBSD: src/bin/dd/misc.c,v 1.23 2002/02/02 06:24:12 imp Exp $
$FreeBSD: src/bin/dd/dd.c,v 1.36 2002/03/07 14:00:33 markm Exp $
$FreeBSD: src/bin/dd/conv_tab.c,v 1.10 1999/09/12 16:51:53 green Exp $
$FreeBSD: src/bin/dd/conv.c,v 1.16 2002/02/02 06:24:12 imp Exp $
$FreeBSD: src/bin/dd/args.c,v 1.31 2002/02/22 20:51:00 markm Exp $
% sw_vers
ProductName: Mac OS X
ProductVersion: 10.13.5
BuildVersion: 17F77
% dd if=/dev/zero of=./xhyve.img bs=1M count=5000
dd: bs: illegal numeric value
% dd if=/dev/zero of=./xhyve.img bs=1m count=5000
5000+0 records in
5000+0 records out
5242880000 bytes transferred in 5.325281 secs (984526468 bytes/sec)
As I feared, this is a GNU vs BSD mismatch. 1m
(lowercase) is not accepted by GNU dd (my version is 8.25). I think we can settle this with 1024k
(lowercase) which is equivalent and should work on both.
I think we can settle this with
1024k
(lowercase) which is equivalent and should work on both.
Revised.
I was under the impression this project only targeted users on Mac (BSD) platforms. (Edit: xhyve and all.) For that reason, I had not paid any consideration to GNU dd
implementations.
BSD dd will barf on an uppercase unit of measurement.
From the dd(1) man page: