osx truncate sd card img : <p>I have created an image of my sd card containing raspbian using the <code>dd</code> tool. This gave me a 16,09 GB big image file. The actual data on there is about 5gb, and I want to truncate it so I can store/clone it onto a 8gb sd card.</p>

<p>All help results I found required Linux to do this (tools like resize2fs doesn't appear to be available for osx, at least, can't find it with homebrew).</p>

<p>What tool(s) can I use to remove the 'empty' space of my .img file?</p>
