Answers
Got a burning question about open source or the kernel? Whatever your level, email it to lxf.answers@futurenet.com
Neil Bothwick can diagnose a printer problem from a 1,000 paces.
Q
Space invaders
My 1TB SSD is at 37 per cent full. It seems to be more full than expected. Is there a GUI program, or command line for terminal, that I can use to see the size(s) of files listed, instead of having to check the size of each folder individually with the mouse?
The only program that I can think of that may be taking up a lot of space is my
Thunderbird
mail, as it saves/ archives many years’ worth of emails. However, upon checking the invisible folder .thunderbird, it’s only 3.5GB Perhaps there’s another folder that Thunderbird saves all the past emails in?
Michael
A You don’t say which distro or desktop you’re using, but for KDE there’s Filelight and for GNOME there’s Disk Usage Analyser. Both do a similar job, showing your directories grouped by space usage and enabling you to drill down to find exactly where the space hogs are located.
If you prefer the terminal, we recommend ncdu, which performs a similar job. It shows all the files and directories in the path you give it, or the current directory, sorted by size. Select a directory to obtain a breakdown of its components and so on. All programs have options to delete the files you don’t like the size of – use this feature with care!
Run one of these if you only want to check your home directory, but you will have to use sudo if you want to check the entire drive.
There are a couple of points and options to bear in mind, particularly when checking a whole filesystem. Pass the -x option to ncdu to prevent it descending into other filesystems. This is essential when running it on / because it will otherwise spend ages trawling through virtual filesystems like / proc and /sys and even longer searching any mounted network shares.
Another thing to watch out for are files hidden from view by mounted filesystems. Say you have a network share at /mnt/ backup to which your daily backups are sent and one day it’s not mounted. The backups will be sent to /mnt/backup on /, but they won’t be visible when you check because the network filesystem is mounted over them. There’s an easy way to deal with this with these commands as root: $ mkdir -p /mnt/tmp $ mount / /mnt/tmp --bind $ ncdu -x /mnt/tmp
By bind mounted / to another location, all of its content is visible there because no other filesystems are mounted on top of it. Once you’ve finished checking, just unmount the bind mount. $ umount /mnt/tmp