Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> Re: UNIX question du vs df -> large discrepancy

Re: UNIX question du vs df -> large discrepancy

From: I.S. Manager <>
Date: Tue, 25 Jul 2000 15:50:46 -0700
Message-Id: <>

Two things can cause this type of discrepency:

  1. File space is not released back to the filesystem as long as any process has the file open. You can, therefore, create a big file, open it with some program (not vi), delete it from the directory, and not see any change in the df until the program is closed. In fact, that's a good way to create hidden workfiles in unix programs, which are cleaned up automatically when the program ends.

Based on what you're saying, this is probably the case. 'fuser' might help you locate the file and program.

2) Unix filesystems are weird in that you don't have to actually allocate all the space for a given size of file. You can, for instance, create a file in a program, write 1K bytes at the beginning of the file, fseek to the 1MB point, write another 1K bytes, and close the file. The file will show as 1MB size, but will only *use* 2K on the disk.

At 02:07 PM 7/25/00 -0800, you wrote:
>Any ideas? 936 kb vs 480 Mb is good size difference. It's been like this for
>two days. du reflects what I see in the directories.
>df -k /opt/oracle
>Filesystem kbytes used avail capacity Mounted on
> 479982 479514 0 100% /opt/oracle
>du -dsk /opt/oracle
>936 /opt/oracle
>- Paul
>Author: Troiano, Paul (CAP, GEFA)
>Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
>San Diego, California -- Public Internet access / Mailing Lists
>To REMOVE yourself from this mailing list, send an E-Mail message
>to: (note EXACT spelling of 'ListGuru') and in
>the message BODY, include a line containing: UNSUB ORACLE-L
>(or the name of mailing list you want to be removed from). You may
>also send the HELP command for other information (like subscribing).

Dennis Taylor
The opinions expressed herein are mine. Get your own opinions!
Received on Tue Jul 25 2000 - 17:50:46 CDT

Original text of this message