use of /var folder

Hi I have some strange problem my /var dir is on separet partition of 7 GB. When I execute
df -h var/
Filesystem Size Used Avail Use% Mounted on
/dev/sda7 7.4G 6.6G 379M 95% /var

But when I type:
du -ch var/

793M total

what is the problem and how is this possible? I’m using Ubuntu server

Can some one help me because this is very important to me.

Thanks a lot

I have found a solution. Its because if you open a file and after delete it is still in memory and that why it take a lot of space.
You can scan for open files with this command:
sudo lsof -n | egrep “/var/” | sort -n -k5 and close it. But be cearfule because apache may need to be started.

it is interesting to put a logfile rotation so that you do not get logfiles of +30MB. This avoids big logfiles. The larger your logfiles, the slower your system.