Help! I'm over my disk quota!

This page provides some information on tools and utilities that are available for you to use to investigate your disk usage, and provides some guidance on how to clear up space and apply for more disk quota.


Finding out what's using the space with du

The easiest way to find out how much disk space files and directories are using is to log into linux and do:

du -s -k * | sort -n

i.e. give me a summary (-s) of the disk usage (du) in kilobytes (-k) of everything (*) and sort (sort) the output (|) in numerical order (-n), which should give you something like this:

.
.
765	public_html
1041    mail
12981   java
15217   nsmail

So in this case I can see that I've got 765k of web pages, 1Mb of mail, 13Mb of java stuff and 15Mb of netscape mail.

Under Windows you can right click on a directory and select "Properties" from the file menu to find out how much disk space it is using.


Finding out what's using the space with jdiskreport

Jdiskreport displays various graphical representations of the disk space used by files and directories. To run it under linux, just type:

jdiskreport

In the first window select "Analyse <your home dir>".

You should then see a window like this one: JDiskReport 1

If you click on a slice of the pie it will descend into that directory and display the usage for that directory. You can also select the "Top 100" files tab to determine which files are using up the most space.


Cleaning up

Some of the most common offenders that need to be kept in check are:

  • Postscript/pdf files
  • Postscript files i.e. files that end in .ps are usually large and are usually downloaded from the web in order to print out, such as lecture notes. So once you've printed them, remember to delete them, you can always download them again. The same applies to .pdf files.

Compressing files to save space


Gzip

  • Simply do "gzip file" to compress a file which after compressing will be called "file.gz"; do "gunzip file.gz" to uncompress the file. Files compressed with gzip can also be uncompressed with 7-Zip. Text files, especially postscript, can be drastically reduced in size using gzip.

Tar and compress

  • To "zip up" a whole directory into a single compressed file do "tar -zcvf mydir.tar.gz <directory>", check the contents of the tar file with "tar -ztvf mydir.tar.gz" and then you can delete the directory that has been zipped up. To unpack the directory again do "tar -zxvf mydir.tar.gz", but make sure the directory you are un-tarring doesn't exist already otherwise its contents will be overwritten. .tar.gz files can be read with WinZip too.

Zip/7-Zip

  • 7-Zip can be used on Windows by right-clicking on the file/directory you want to zip and selecting "Add to archive" from the menu - you may want to select zip as the archive format to ensure interoperability. Whole directories can be compressed into a single zip file in this way. Under linux use "zip" and "unzip" to make/open zip files. Do "zip/unzip -help" for options.

Gotchas

  • Do not be tempted to delete any files or directories that start with ".", e.g. .login, .cshrc, .xclients, these are important start-up files and you will not be able to log in if you delete them and besides they are miniscule so you won't be saving any disk space by deleting them. In general, program settings are stored in .files so unless you know what it is, it is best to leave it.

Getting more disk quota

Once you have cleaned up as much as possible but find that you are still short of space for your work, then you can apply for more disk quota to be allocated by contacting the IT Service Desk https://universityofbirmingham.service-now.com/ and giving us an estimate of how much more you will need in order to accomodate your work.