mazato said: caljohnsmith: I had already had that in mind. But I dont understand the part that you said:"so that the free space will be compressed".
I know that the image will be compressed with gzip,but, what free space are you refering to?! Also the bs operand, is that indicating the blocksize. I read the man but i cant get it yet! All I was saying is that the entire HDD image will be compressed with gzip if you use the command I gave, so you can store the HDD image as a smaller file than the entire HDD size. But when you uncompress the HDD image and restore it to a HDD, the image will of course be the full size as the HDD you originally compressed. I don't know of any way to use dd to "leave out all the free space on my HDD" like you originally mentioned, unless the free space is unallocated space that is not part of the partitions. If that were the case, you could use dd to just copy the partitions and not copy the unallocated space. The only way I know of to "leave out the free space" in a partition would be to shrink the partition prior to cloning it with dd.
And about the "bs" option with dd, it is basically how big of a chunk of data (block size) dd copies at one time before writing to its output file. "dd" normally defaults to a bs of only 512 bytes or one sector, so copying an entire HDD one sector at a time can be really slow; that is why I used the "bs" option to specify a larger block size.