Disk Quotas for UNIX & mail inbox files
LAST EDIT: 28 Cheshvan 5759, 17 Nov 1998, by Haim Roman.
CONTENTS:
- WHAT ARE QUOTAS, AND WHAT ARE THE POLICIES?
- CHECKING YOUR USAGE AND QUOTA
- CLEANING YOUR FILES
- MORE INFORMATION
1.1. Introduction
A disk quota is simply a limit on how much disk space you
can use. Without quotas, some users would use so much disk space that
they would fill up the disk. When this happens other users cannot
work.
In UNIX, there are actually 2 types of quotas:
- quota, or soft limit
- This is the amount of disk space that you are allowed to use.
However, you are allowed to use more than this for a short period
of time. This allows you more flexibility when you need to use a
lot of disk space in temporary files.
- limit, or hard limit
- You are not allowed to use more than this, even for a second.
1.2. Our Policy
The current policy is to grant each user a quota of 16 megabytes (MB).
In addition, the user is allowed up to 5 megabytes for his/her mail
inbox file. If you feel that you need more, please send mail to
'problems' (see below for
more information on this address). Please state how much you think
you need, and why. If you are a student, your instructor or project
advisor should also send us a note authorizing your request.
To see if you are over your quota, simply type the command
quota. To get more information, type
quota -v. The "-v" option means
verbose; that is, it gives more information. Here is a
sample of its output:
Filesystem usage quota limit timeleft files quota limit timeleft
/var/spool/mail 62 8000 18000 21 0 0
/usr/u 0 10 1000 0 0 0
/usr/u2 0 10 1000 0 0 0
/usr/u1 0 10 1000 0 0 0
/remote/makot/opt 0 10 1000 0 0 0
/usr/local/etc 0 10 1000 0 0 0
Here are the meanings of the columns:
- Filesystem
- A section of a disk. If the filesystem containing your home
directory fills up, then you cannot write any files. It does not
help if other filesystems on the same disk have room.
- usage
- How much disk space your are using. The number is in units of
kilobytes (1 kilobyte = 1024 bytes). Divde this number by 1000 to
get the approximate number of megabytes.
- quota
- I.e, the soft limit.
This column is also in kilobytes. 0 means no quota.
- limit
- I.e., the hard limit.
This column is also in kilobytes. 0 means no quota.
- timeleft
- if you are over your quota, this is the amount of time the system
gives you to delete files so that you are under your quota. If
you remain over your quota after this time, you will not be able
to write any more files.
- files
- Besides quotas on the amount of disk space, we can also set quotas
on the number of files you are allowed to have.
This column shows how many files you have.
- quota, limit, & timeleft
- Similar to above, but relevant to number of files.
Unfortunately, the output of quota -v can be confusing,
because it gives you a lot of irrelevant information. You can ignore
the following data:
- Any row that has a very small quota. That means that you probably
do not files in that filesystem.
- The 'files' column and all columns to the right of it.
3.1. Deleting
One way to clean up your home directory is to delete files. Use the
rm -i command to delete. 'rm' stands for
'remove'. '-i' stands for interactive; before deleting each file, the
system asks you if you really want to delete it.
To delete an entire subdirectory, you can use
rm -ri. The additional 'r' means 'recursive';
it deletes all files under a given directory.
You probably want to delete any files whose names end with '~' or
whose name is 'core'. The emacs saves backups of files it
edits; the name of the backup is the name of the file with the '~'
appended to the end. Thus, if you editing a file named 'foo', emacs
will create a file called 'foo~'. If a program crashes, the state of
the program is saved in a file named 'core' (that is why this is
called dumping core). You only need the core file for
debugging. In fact, you can prevent the core file from being created
in the first place by running the command
limit coredumpsize 0. Put this command in the
'.cshrc. file in your home directory.
WARNING: if you accidentally erase files that you really want
to save, we might not be able to restore them soon. Be careful!
3.2. Compressing
For files that you want to save, but do not use much now, you should
compress them. For this, use the command gzip. To compress
all files within a directory (say the directory is called 'foo'), run
gzip -r foo. As with the rm command,
'-r' means 'recursive'.
You can uncompress files with the gunzip command. As with
gzip, it also takes the '-r' option.
3.3. Mail Inbox
You should not leave old messages in your mail inbox. That
could cause the mail inbox to grow quite large. You should either
delete a message after you read it, or save it in a different folder.
You can get more information about the above commands via the
man command. You can access a web-interface to the man
command, as well as other information from the
Computer Center home page.
You can also send mail to
problems. A copy of this
mail gets sent to almost all members of the Computer Center, and is
thus usually better than sending mail to specific staff members.