Ubuntu Linux, like all unix varieties, includes the du command line utility. du stands for Disk Usage, as I’m sure you assumed.

Go ahead, just type the command in your home directory:

geek@ubuntu-desktop:~$ du
8 ./.gconf/desktop/gnome/accessibility/keyboard
12 ./.gconf/desktop/gnome/accessibility
8 ./.gconf/desktop/gnome/screen/default/0
12 ./.gconf/desktop/gnome/screen/default
16 ./.gconf/desktop/gnome/screen
8 ./.gconf/desktop/gnome/font_rendering
40 ./.gconf/desktop/gnome
44 ./.gconf/desktop
8 ./.gconf/apps/panel/applets/clock_screen0/prefs
16 ./.gconf/apps/panel/applets/clock_screen0
8 ./.gconf/apps/panel/applets/trashapplet_screen0
8 ./.gconf/apps/panel/applets/workspace_switcher_screen0/prefs
16 ./.gconf/apps/panel/applets/workspace_switcher_screen0

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:

geek@ubuntu-desktop:~$ du -s -m *
1 Desktop
0 Examples
17 VMwareTools-5.5.2-29772.tar.gz

Now we are getting somewhere. That’s some pretty useful output.

Lowell Heddings Lowell Heddings
Lowell is the founder and CEO of How-To Geek. He’s been running the show since creating the site back in 2006. Over the last decade, Lowell has personally written more than 1000 articles which have been viewed by over 250 million people. Prior to starting How-To Geek, Lowell spent 15 years working in IT doing consulting, cybersecurity, database management, and programming work.
Read Full Bio »

The above article may contain affiliate links, which help support How-To Geek.