My Oracle Support Banner

Oracle Linux: Check Disk Usage Meaningfully (Doc ID 2522329.1)

Last updated on FEBRUARY 26, 2020

Applies to:

Linux OS - Version Oracle Linux 5.11 to Oracle Linux 7.6 with Unbreakable Enterprise Kernel [4.14.35] [Release OL5U11 to OL7U6]
Linux x86-64
Linux x86


The venerable df(1) and du(1) commands may give inconsistent results because the commands do not interpret disk occupancy in the same way.  For example, a sparse file size may show as 10Tb but the file may only occupy 1 block of disk space.

The command du -sh /var/* doesnot show the proper summary of the disk usage, only an approximation.  We suggest additional ways to check disk usage below.

Sample output

The df(1) command shows 30G space consumption, but the individual file roster given by du(1) shows significantly less.



To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document
 Alternative Commands
 Sample Output

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.