问题
I have created an image of my sd card containing raspbian using the dd
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.
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).
What tool(s) can I use to remove the 'empty' space of my .img file?
回答1:
If you just created it using dd
, it is just a dump with no filesystem-specific interpretation, so you can just as easily use dd
to get the first 6GB or so:
dd if=Existing16GBimage.img of=New6GBimage.img bs=1m count=6000
来源:https://stackoverflow.com/questions/43210957/osx-truncate-sd-card-img