How do I check disk usage on my Linux server?

View a step-by-step screencast of this process:

Log into the RHEL server as root via PuTTY, or shell out from Eterm.

The “df” command is used to determine overall filesystem usage. The “vgs” command will show you any space available in the volume group that has not yet been allocated to a specific filesystem.

To see the total size of each filesystem:

df -h

The standard Eclipse filesystems are located under /u2. Add the “Used” column for each of these filesystems, plus any non-standard Eclipse filesystems that you may have (/train, /backup, etc.).

[root@firestorm ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
                       20G   18G  1.1G  95% /
                      3.9G  2.1G  1.6G  57% /u2
                      3.9G  137M  3.6G   4% /u2/uvtmp
                      5.9G  3.4G  2.3G  60% /esupport
/dev/sda1              99M   26M   69M  28% /boot
tmpfs                 3.9G     0  3.9G   0% /dev/shm
                       26G   17G  7.6G  69% /u2/eclipse
                      992M   34M  908M   4% /u2/eclipse/ereports
                      3.9G  2.1G  1.6G  57% /snap/u2
                      3.9G  137M  3.6G   4% /snap/u2/uvtmp
                       26G   17G  7.6G  69% /snap/u2/eclipse

If you would like to identify which files or subdirectories are using the most space in a particular filesystem or directory, you may use the “du” command. For example, to list the disk usage of top files and directories under /u2/eclipse in megabytes:

[root@firestorm ~]# cd /u2/eclipse
[root@firestorm eclipse]# du -sm * | sort -rn | head
3780    modules-linux
2856    modules
1568    ZIP4
859     jsdata
740     modules-test

If you would like to see how much space is available for allocation within the volume group:


For more detail on this process, see: How do I expand a Linux file system?

Alternatively, if you prefer a graphical tool, you may log into the server’s GUI, and use the Disk Usage Analyzer tool:

  • Log into the server’s GUI (see also How do I access the GUI of my Linux server?)
  • Applications -> System Tools -> Disk Usage Analyzer
  • Click the Filesystem button to begin storage analysis of your entire system
  • Use the controls to drill down into each subdirectory for a graphical picture of storage utilization