Disk Usage Checking

From PCLinuxOShelp Knowledge Base

Jump to: navigation, search

Disk Usage Checking in Linux

'du' – Disk Usage summarize disk usage of each FILE, recursively for directories under Linux.

To check disk usage of your current working directory, enter the following in a console window

[root@workbox home]# du


280 ./.kde/share/config
4 ./.kde/share/servicetypes
4 ./.kde/share/apps/korganizer/income.counter
4 ./.kde/share/apps/korganizer/income.delegated
4 ./.kde/share/apps/korganizer/income.cancel
4 ./.kde/share/apps/korganizer/income.reply
4 ./.kde/share/apps/korganizer/income.accepted
4 ./.kde/share/apps/korganizer/income.tentative
36 ./.kde/share/apps/korganizer
44 ./.kde/share/apps/kconf_update/log
48 ./.kde/share/apps/kconf_update
8 ./.kde/share/apps/kfileplaces
4 ./.kde/share/apps/konqueror/servicemenus
8 ./.kde/share/apps/konqueror
12 ./.kde/share/apps/kjots
4 ./.kde/share/apps/kabc/lock
8 ./.kde/share/apps/kabc
4 ./.kde/share/apps/ktimetracker
28 ./.kde/share/apps/blogilo

Above listing has been clipped due to size.

It shows you a very verbose output by default, which isn’t always extremely useful. Thankfully it also includes a lot of extra options.
To find the total size of files and folders in our current directory, listed by MB:

[root@workbox home]# du -s -m *
   44960   dwmoar
   1       lost+found
   356     xbmc
   [root@workbox home]#

For more information about the du command use the command du --help

Personal tools