Disk Quota

Disk quotas at CSE

The amount of disk space you can use in your home directory is limited. This limit is called your disk quota.

If files in your home directory take up too much disk space, you will be unable to save any more files (or changes to existing ones) until you free up space.

Checking your disk quota

To check your disk quota, open a terminal on a lab machine or login server and run the rquota command.

You should see something like the following: Disk quotas for user z1234567 (uid 12345): Filesystem space quota limit grace files quota limit grace /export/ravel/1 382M 620M 850M 9629 457k 513k

The numbers you care about are the first three:

  • space - Your current usage of allocated space(in MB)
  • quota - Your quota, with period of grace
  • limit - Your quota, hard limit without grace

If you are using less space than your quota, then you are fine.

If you are using more space than your quota, then you will need to delete some files.

If you go over your quota

To prevent one file from suddenly preventing you from saving, there is a grace period system.

You can go over your quota for a week, but you cannot go over your limit.

If you exceed your quota:

  • You will receive a warning mail.
  • For one week, you will be able to store up to your limit.
  • After the end of that week, you will not be able to save anything until you go back under your quota

Finding files to delete

On a lab machine

One of the easiest ways to check where your space has gone is to run the baobab command on a lab machine.

Click 'Home Folder' to see a graphical breakdown of the space usage in your home directory.

Right-clicking an entry in the file browser pane will allow you to move it to the trash.

On the login servers

baobab isn't available from the login servers, so you should use the text console tool ncdu.

This shows you the files and directories that use the most space and allows you to delete them.

A more basic way to list large files and directories is with the du command. $ cd $ du -h -d1 . | sort -rh 1.9G . 279M ./.local 216M ./Personal 193M ./.config 188M ./Projects 175M ./public_html 161M ./Desktop 140M ./.eclipse 68M ./.npm 64M ./lib ... ...

This will give you a list of the directories within your home directory, with the largest listed first.

(Note that the first entry is your entire home directory; you don't want to delete that one...)

You can get a breakdown of each subdirectory in turn by replacing the . with the directory name in question.

For instance, du -h -d1 public_html | sort -rh

You can then delete these as you see fit, using: rm -rI directory or: rm -I filename

Be careful, as files deleted this way do not go into the Trash, and cannot be undeleted.

(There may be backups available; if you make a mistake, contact System Support, who can check for you.)

What can I safely delete?

There's no single answer to this question, as it depends what you're working on.

However, there are some common space-hogs that most people can get rid of…

Trash

Sending files to Trash rather than deleting them outright will leave them in your account where they will still take up space.

Files sent to Trash are kept in your home directory in the subdirectory: .local/share/Trash/files/

  • To list Trash contents: trash-list
  • To delete Trash older than 7 days: trash-empty 7
  • To delete all Trash: trash-empty

Automatic cleanup

There's a script to clear out cache files, etc. that runs when you log into lab computers, but not (currently) when you log into VLAB or login servers.

You can run it manually with ~csg/scripts/quota/clean-homedir

Files named core

If you're not using gdb, you don't need to keep these - they're memory dumps from crashed programs.

To prevent core files from being produced at all, add this line to your .profile. ulimit -c 0

Your Eclipse profile

Eclipse stores your profile, settings, plugins, etc. in a directory called .eclipse in your home directory.

If you're not using Eclipse this session, you're probably best off deleting this.

Your source code and projects stay in a separate workspace directory, and will not be lost.

Unused browser profiles

Firefox keeps its user profiles in .mozilla/firefox

Google Chrome used to keep its profiles in .config/google-chrome, but now it keeps them in .config/chromium instead.

You can safely delete .config/google-chrome.

If you only use one of these browsers, you can delete the other browser's profile, saving a fair bit of space.

How do I compress files?

The Linux Way to do this is via the command line: tar -czvf CompressedFolder.tar.gz FolderToCompress

(Note that this leaves the original folder in-place - you can delete it afterwards)

For a graphical utility, try Accessories → Archive Manager (or file-roller from the command line.)

The /unsw/ filesystem

If you have study-related files that you want to keep, but aren't really using, you can store them in the UNSW File system.

This is space made available by UNSW central IT, and does not count towards your CSE disk quota.

It's not quite as fast as your home directory, and can't be shared to other users - but if you're just archiving old files, this doesn't matter.

Getting more quota

If you have cleaned up and moved everything you can, and you still don't have enough disk quota for your work, we may be able to grant you some extra space.

Contact your supervisor or lecturer, explain how much extra space you need and why, and ask them to request it on your behalf.

For more detail, see Extra Disk Space.

Last edited by robertd 03/04/2020

Tags for this page:

disk, quota, space