Tips & How-To's

Find out how much space each file is occupying

Consider this situation. You want to know much space is available on your hard disk. No big deal, du can tell you the stats. For this open the terminal and type du -h. You will get the required details as below

sathya@shaman:~$ du -h /home/sathya/Downloads
35M     /home/sathya/Downloads/kubuntu debs
177M    /home/sathya/Downloads
sathya@shaman:~$ du -h /home/sathya/Downloads/kubuntu\ debs/
35M     /home/sathya/Downloads/kubuntu debs

But this isn’t sufficient, and neither is it very elegant. You want to know how much space each file is occupying, or what’s the max filesize occupied by a file. And you want to achieve this with out any console commands. Sounds tough?

Not really! Konqueror comes with an inbuilt “File Size View” which allows you to do just that. And the neat thing is that this works for all mounted partitons. To open this view, open Konqueror. Right click, choose Preview in and select “File Size View”

File Size View

Once this is selected, another view comes up, showing the size of each file. It may take a minute or two as the filesystem is scanned and the files begin to show up. In the end you’ll get a view like:

File Size View, After Scanning is Complete

This is really useful if you want to free up some space on your hard disk, or if you don’t know which file is taking up all that space.

PS: I don’t know of a similar utility for GNOME, as I don’t use it. Would appreciate it if any GNOME users can comment on a similar app.

PPS: If you’re using KDE 4.x , then as of now, Dolphin doesn’t have the File Size view, so you can’t check this. There’s another program, KDirStat, which can perform the same utility, but I haven’t tested this. Any comment on this would be much appreciated as well!


  1. ‘Stumbled’ here today.


    du -hac downloads/

    list (h) in human readable form (a) all files and (c) produce a grand total for the local directory ‘downloads.

    [dmcreynolds@host-192-168-30-82 ~]$ du -hac downloads/
    86M downloads/eclipse-java-ganymede-SR1-linux-gtk.tar.gz
    8.8M downloads/apache-ant-1.7.1-bin.tar.gz
    92K downloads/GDM-DarkCleanLinux.tar.gz
    3.9M downloads/flash-plugin-
    64M downloads/jdk-6u11-linux-i586.rpm
    40K downloads/sun-javadb-common-10.4.1-3.1.i386.rpm
    908K downloads/sun-javadb-demo-10.4.1-3.1.i386.rpm
    4.4M downloads/sun-javadb-docs-10.4.1-3.1.i386.rpm
    188K downloads/sun-javadb-javadoc-10.4.1-3.1.i386.rpm
    116K downloads/provider_for_google_calendar-0.5.1-tb+sb.xpi
    19M downloads/jre-6u11-linux-i586.rpm
    2.1M downloads/lightning-0.9-tb-linux.xpi
    8.0K downloads/QA.p12
    7.8M downloads/axis-bin-1_4.tar.gz
    1.2M downloads/enigmail-0.95.7-tb+sm.xpi
    332K downloads/Klikit Dragon Blue.tar.gz
    480K downloads/sun-javadb-client-10.4.1-3.1.i386.rpm
    3.7M downloads/sun-javadb-core-10.4.1-3.1.i386.rpm
    207M total

Leave a Reply

Your email address will not be published. Required fields are marked *