0

I want to create a DD image of a Volume of OSX from mac with none of the empty space, only the used space with data on it , to reduce the size of he img/dmg/raw file.

I've tries multiple software but to no avail, DD is doing the job, but its the exact size as the original/source disk size , I'm looking for an option to do it with out the empty space to save space. using command line/terminal

2 Answers2

1

Zip it... like this:

dd bs=4M if=[path to source] | gzip > [path to dest]

to restore:

gunzip --stdout [path to backup] | sudo dd bs=4M of=[path to restoration device]
Greenonline
  • 2,390
cainbantam
  • 11
  • 1
0

Your requirement "only the used" space requires the copy program "dd" to interpret the internal organisation of the file system.

This is far beyond the scope of a block oriented copy program which is pretty small. In the windows world commercial programs exist for this task. The comfort of having this option is not part of the tools that come with the operating system.

r2d3
  • 4,050