Sometimes it's usefull to create sparse files on Linux. For example, when you're creating Xen hard disk images, creating a sparse file will take up much less space then creating a fully allocated file, and will only start taking up space as it fills up.

view plain print about
1dd if=/dev/zero of=filename.img bs=1k seek=128M count=1
This will create a sparse file of 128GB. Adjust the seek parameter to get the file size that you want.

If you need to find out the real space that the file is taking up, use du -lah

view plain print about
1# du -lah
220K ./filename.img
328K .

Using ls will only show you how big the file is supposed to be

view plain print about
1#ls -lah
2total 36K
3drwxr-xr-x 2 root root 4.0K Jun 5 13:59 .
4drwxr-xr-x 3 root root 4.0K Jun 5 13:59 ..
5-rw-r--r-- 1 root root 129G Jun 5 13:59 filename.img