dd: bs: illegal numeric value error on Mac OS X

I hit the above error when I tried this simple command-

dd if=/dev/random of=dummy bs=1M count=200

This command worked just fine on my fedora 12 VM but wouldn’t on Mac. To my surprise, the problem was in the case of the letter ‘M’. Mac accepts only small letters. Changing ‘M’ to ‘m’ worked!

Mac OS X, is kinda BSD fork. So I expected it to behave just like its other Unix counterparts. But Apple is notorious for doing things its own way! And this quirk is one of them.

Wait, before we close off, just an obvious reminder. Fedora complains of the exact same error when you use lowercase ‘m’. So you need to feed it ‘M’ only.

Hope this saves some 15 minutes of your time.

Advertisements

5 thoughts on “dd: bs: illegal numeric value error on Mac OS X

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s