Getting under quota

Getting under quota

If you find yourself over quota on a filesystem, it is best to take care of the situation before your time limit runs out. You do have a week's grace period before the soft disk quota is enforced.

So when you run quota, you receive a message like this:

    Over disk quota on /fac/u41, remove 7495K within 6.0 days
How do you find where the space is taken up?

Finding large files

First, connect to the directory of yours on the filesystem indicated. If you have any core files (program dumps) you don't need, you can delete them to see if it gets you under quota. Find your core files with the command:
    find . -name core print

The next step is to see if you have any large files in the current directory:

    /usr/ucb/ls -s | sort -rn | more
This command will list files in the current directory sorted by size, largest first. The number in the left column is the size in K.

If you don't find any large files in the current directory, your usage may be spread out in subdirectories. Try the command:

    /bin/du -ks * | sort -rn | more
The output of this command is similar to the one above, but now the contents of directories (recursively) will be considered too. If a subdirectory is listed here with a large size, you should connect there and look for large file/directories from that point.

Freeing up space

So now you've hopefully found some large files which you don't need right away. If you don't need them at all or can easily regenerate or download them, you can just delete them. If you will need them at some point in the future but not right away, the best thing to do is compress them. Two programs to do this are Sun's compress and gnu's gzip. Since gzip does a better job of compression, we recommend that. [Note: After your time limit expires, you will not be able to compress files as that involves creating new compressed copies of the files before removing the uncompressed ones. This will not be allowed at that point.]

Where is the space usage?

It is possible that all your usage is not in your directory. This can be easily demonstrated by the command
    /bin/du -ks
while connected to your directory on the filesystem on which you're over quota. The number displayed does not match what
    quota -v
tells you for that filesystem.

The commonest way for this to occur is working on a shared project. If the shared project directory is on the same structure you're over quota on, all your files there will count against your quota as well. The easiest way to find files of yours in a shared directory is to connect to that directory and issue the command:

    find . -user username -print
where username is your username.

If you still can't find all your usage, the best bet is to send email to help explaining the problem and asking someone with privileges to look for all your usage.

But I don't have a directory on that partition!

Occasionally, you may receive a notice that you are over quota on a partition where you don't even have a directory. It is possible for this situation to arise in a couple of ways. The most likely is that you sometimes work in a shared directory under someone else's home directory. If you're being told of files on a filesystem on which you were unaware you had any files, the easiest way to find them is to issue the command:
    find filesystem -user username -print
where filesystem is the filesystem on which you are reported as being over quota, and username is your username. It is likely that you will get a lot of "Permission denied" errors as find tries to read directories which are protected against you, but you will probably also see where you do have some files.

If this doesn't work, send a message to help asking someone with privileges to help find where your files are.

I need more space!

If you've looked everywhere and cannot find any way to free up some space, send a message explaining the situation and requesting a larger quota to help.
This page last updated June 3, 2002.