Disk Use
Included on this page:
- Introduction
- Additional Disk Space
- Managing Disk Use with the Dante and Homer Menu
- Managing Disk Use on the Unix Command Line
Introduction to Disk Use
Each account on the Uniform Access computers has a set amount of available disk space.
- The amount of disk space your account has initially depends upon whether you are faculty, staff, or student.
- Disk space for your account can sometimes be increased.
- You may not use more than your allocated disk space. If you try to, you will be prevented from writing to files or creating new files, and some programs you run may fail, possibly damaging your files.
- Simple commands are available to show how much disk space you have available, how much you are using, and to make it simple for you to delete unneeded files.
Additional Disk Space
Standard Resources
When new accounts are created for faculty, staff and students on the Uniform Access computers, each account is given the standard allocation of disk space.
Additional Disk Quota Allocation
The standard resources meet the needs of many people, but occasionally you may need more. User with access to a departmental budget may request a larger disk quota. Addtional information for pricing on additional disk space is published on-line.
To request permanent increases in your account's available disk quota please send an email Computing and Communications Information help@cac.washington.edu including the requested quota limit and the budget number to be charged. You may also call 206-534-5970 for additional information.
Managing Disk Use with the Dante and Homer Menu
Managing your disk use is simple on Dante and Homer. The login menu provides easy to use commands that show information about how much disk space you are using and make it easy to list and delete unneeded files.
- Available Disk Space
- From the main menu, press O (Other Choices), and then press D (Show Disk Use Status)
- Deleting Files
- From the main menu, press O (Other Choices), and then press B (File Browser). Using the arrow keys, move the highlight to files you no longer need and press D.
Managing Disk Use on the Unix Command Line
Managing your dis us is also easy from the command line. The following information also applies to Dante and Homer when working at the Unix shell prompt (from the main Dante or Homer menu, press S to go to the Unix shell).
What is Your Quota?
You can see what your current quota and disk use are with the assets command.
When you issue the assets command, you will see a table. One of the rows in the table will look like this:
Threshold Usage
--------- -----
5.00 2.10 Megabytes disk space (approximate average)
In this example, the person has a maximum disk allocation of 5 megabytes and currently has 2.1 megabytes of files.
If You Exceed Your Quota
If your disk storage exceeds your quota, you will receive a warning message each time your login. You must immediately reduce your disk use by deleting files, writing files to tape, or transferring files to other systems.
IMPORTANT: Trying to work in an account that has exceeded its quota is dangerous - you are likely to damage or lose files. For example, DO NOT use email or an editor.
If you do receive the "DISK QUOTA EXCEEDED" message, follow this checklist:
- Do you have the full disk space allocation you are entitled to? Call Computing and Communications Information at 206-543-5970 if you feel you may qualify for more disk space.
-
Use the du and ls
commands to determine what is using up your disk
space.
First, issue the cd command to move to your home directory. The du command summarizes the number of kilobytes of files in each directory and subdirectory. The listing will give you an idea which directories are taking up a lot of space.
unix% cd unix% du 42 ./physics 6 ./math 8 ./sas 2 ./lit 469 ./mail 25 ./misc 2047 .The ls -s command can be used to see how big specific files are in the current directory or in a subdirectory.
unix% ls -s physics total 41 7 inertia 12 fall 12 fall.old 10 paperIn this example, the ls -s command is used to see the size of the files in the 'physics' subdirectory.
IMPORTANT: Your disk use is the total size of all files and directories that YOU OWN, not just of the files in your home directory and subdirectories. For example, if you copy (cp) a file to someone else's home directory, the file is still "owned" by you, although it is not in any of your directories.
-
Remove unneeded files using the rm
command.
unix% rm physics/fall.oldHere, the rm command is used to remove the fall.old file in the physics subdirectory.
-
Compress files that you want to keep but only
occasionally use.
For example, say we wanted to keep the fall file in the physics subdirectory, but would not need to access it often:
unix% ls -s physics total 41 7 inertia 12 fall 10 paper unix% compress physics/fall unix% ls -s physics total 41 7 inertia 8 fall.Z 10 paperIn this example, the fall file in the physics subdirectory was compressed. Notice that the compress command does not give any confirming message. The compressed version of the file is renamed with a .Z name extension and the size of the compressed file will usually be from 10 to 30% smaller than the original file. To uncompress a file, use the 'uncompress' command. For example:
unix% uncompress physics/fall unix% ls -s physics total 41 7 inertia 12 fall 10 paper -
If you have a directory of files you want to keep,
use the tar command to assemble the
directory, all the files it contains, and any
subdirectories and their files into a single file and
then compress that file.
Tar is a complex utility. The following example shows only the basics of its use.
unix% tar -cvf - physics > physics.tar a physics/inertia 14 blocks a physics/fall 23 blocks a physics/fall.old 23 blocks a physics/paper 20 blocksThe contents of the physics subdirectory now are consolidated into a single file (physics.tar).
Next, use the compress command on the tar file:
unix% ls -s physics.tar 41 physics.tar unix% compress physics.tar.Z unix% ls -s physics.tar 30 physics.tar.ZIn other words, by taring and then compressing the directory, we have not only put it and its contents into a single file, we have reduced the space it occupies by 25%.
You can remove the directory with these commands:
unix% rm physics/* unix% rmdir physicsTo retrieve the contents of the physics.tar.Z file, first uncompress it:
unix% uncompress physics.tarTo find out the contents of a tar file, use the tf options for the tar command:
unix% tar tf physics.tar physics/ physics/inertia physics/fall physics/fall.old physics/paperTo retrieve the contents of a tar file, use the xf option of the tar command:
unix% tar xf physics.tar unix% ls -s physics total 41 7 inertia 12 fall 12 fall.old 10 paperNotice that the physics directory was recreated and the files were written into the directory. In other words, the files are retrieved within their directory structure.
- You could check out temporary disk space with the chkout command, to give you room while you sort out what you want to keep and where to put it. Read chkout man page for further information about temporary disk space.
- The Uniform Access computers also have an archive system that allows you to store your files for long periods.
After the Cleanup
Now that you have remove or squished your files and directories, how much space have you freed up?
You can use du and ls as described above. However, before you run assets, you must first give the adjquota command. This command goes through all of the disk storage on the computer and totals up the size of the files belonging to you. Normally, the adjquota command is given automatically by the system each day. You can evoke the command yourself when you want to know immediately how close you are to your quota limits.
SEE ALSO
man pages:
rm(1), adjquota(1), compress(1), uncompress(1), tar(1),
du(1), ls(1)
