I am trying to create an empty file based on the remaining hard disk space. The problem is that when I create a file that is 1 GB large, the df command shows the remaining space to be only 12 kb smaller than it was before the file was created.
someone@here:/tmp/delete# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 36827144 5031592 29924788 15% /
tmpfs 508508 0 508508 0% /lib/init/rw
varrun 508508 156 508352 1% /var/run
varlock 508508 4 508504 1% /var/lock
udev 508508 140 508368 1% /dev
tmpfs 508508 1108 507400 1% /dev/shm
someone@here:/tmp/delete# dd if=/dev/zero of=tempFile bs=1000 count=1 seek=1000000
1+0 records in
1+0 records out
1000 bytes (1.0 kB) copied, 0.000438915 s, 2.3 MB/s
someone@here:/tmp/delete# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 36827144 5031604 29924776 15% /
tmpfs 508508 0 508508 0% /lib/init/rw
varrun 508508 156 508352 1% /var/run
varlock 508508 4 508504 1% /var/lock
udev 508508 140 508368 1% /dev
tmpfs 508508 1108 507400 1% /dev/shm
Does anyone know why the df command doesn't account for the full 1GB? Thanks.