Accounts

ID #1001

How to get under quota: Finding and removing excess files.

It is the user’s responsibility to monitor and manage disk usage and keep it under quota. If you happen to go over your quota, you will be unable to log in graphically to any Unix computer. You can, however, still log in remotely through SSH or through the "failsafe" login when sitting at the computer.

For Linux or Unix machines, you can view your current disk usage and quota by executing the following command:

Finding Out if You Are Over Quota

quota –v

You should see output similar to this:

Disk quotas for user test_user (uid 65331):
Filesystem blocks quota limit grace files quota limit grace
/filesys 140732 200000 210000 4362 20000 21000

There are two resources limited by our quota systems: disk space and number of files. Disk space used is listed under "blocks," with the corresponding limits listed after it under "quota" and "limit." Your number of files used is listed under "files," with the quota also following. If either your disk space or number of files used is greater than the "quota" (soft limit) or "limit" (hard limit) you should attempt reduce your resource usage.

Determining Your Current Disk Space Usage
When in your home in directory, use the command:

du –sk * .??* | sort –rn | head

to see a list of your 10 largest files or directories (biggest displayed first). This command also works from within sub-directories allowing you to get a finer-grain view of usage. You can judge which are good candidates to delete or compress.

Determining Your Current File Usage

When in your home directory, use the command:

/usr/local/bin/countfiles

to see your 10 directories with the most amount of files in them. This command also works from within sub-directories allowing you to get a finer-grain view of usage. You can judge which are good candidates to delete or archive.

Removing/Archiving Files and Directories

When near or over quota, look for your cache (or temporary files) in your web browser. See this FAQ for more information. These unneeded and space gobbling cache (or temporary) files are often the worst offenders. They can best be deleted from within your browser program. Look for Internet -> Options -> Temporary Files

Delete any core dump files when you are finished analyzing them.

Your user interface can also produce extraneous cache files. They are located in the hidden subdirectories, .kde/share, .gnome/share. You can examine all of your hidden files, when in your login directory, with the command: ls –la | more

You can also combine multiple files into one (archive) and compress large files to reduce your file and space usage. The "tar" program takes many files and turns them into one. To learn more about it type "man tar." The "gzip" program is used to compress files in size. Type "man gzip" to learn more about it. Also there are many tutorials available on the web, google "tar gzip" to find some.

Troubleshooting Problems

If you believe that the quota program is not accurately listing your current disk usage you can run the following command from within your home directory:

du . -s

it will give you a quick summary of current disk usage.

SImilarly the count files program (/usr/local/bin/countfiles) will give a total of all the files in the current directory.

If either of these counts are different from that listed my teh quota program, please email support at cs.ucsb.edu.

Tags: -

Related entries:

Last update: 2007-05-21 10:39
Author: Richard Kip
Revision: 1.1

Digg it! Print this record Send to a friend Show this as PDF file
Propose a translation for Propose a translation for
Please rate this entry:

Average rating: 4.25 out of 5 (4 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry