Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been using dd if/mnt/sda1/images/$1 of=/dev/$2 to clone some embedded images for compact flashes. I used to only be using one brand of CFs, but, now I have two of them (both 2g, but obviously different amount of blocks) and the DD image is too big for the second brand.

How can I copy the image and ignore the empty blocks so I can fit the image on the new card? I know I can't use DD anymore and I saw reference to ntfsclone in my googling. What would be an effective way to do this? Thanks.

share|improve this question
Is there a reason you're using a block level copy and not a file level copy? – jidar Feb 24 '12 at 17:19
Indeed, why not just copy the files? Also, you’re using *nix right? You can add an OS-specific tag to ensure you get the most applicable answers. – Synetech Feb 24 '12 at 17:23
@jidar I edited it for knoppix, and I was using block level because it leaves it as an ISO. Will a file level copy compact into an ISO as well? – Max Feb 24 '12 at 17:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.