Question: I want to create image from hard disk without free space (useless space) in linux(ex3 type).

I've been tried to create image with **dd** command but this command gave us total size of hard disk.

I need data on this hard disk without free space.

thanks a lot.

Answer: 
If you're using LVM, clonezilla is the way to go.
I use partimage for get image also this program worke with command.

If you get image by bash script you work with this and `dumpe2fs` or `xfsdump` commands.