Sparse files are files containing "holes". The system returns nulls (zeroes) when data is read from these holes.
Here's an example of creating such a file (made on Solaris and UFS):
Code:
$ mkdir sparse
$ cd sparse
$ du -k .
1
$ df -k .
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0d0p4 14421267 11763104 2513951 83% /mnt/p4
$ dd if=/dev/zero of=sparse bs=1024k seek=1024 count=1
1+0 records in
1+0 records out
ls -l
total 2112
-rw-r--r-- 1 jlliagre jlliagre 1074790400 Jun 20 07:52 sparse
$ du -k .
1057 .
$ df -k .
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0d0p4 14421267 11764161 2512894 83% /mnt/p4
The created file reports a size of 1 gigabyte, but use only a little more than 1 kilobyte.
If you copy or backup this file with tar, the result won't be sparse, so much bigger.