|
|||
Department of Engineering | |
University of Cambridge > Engineering Department > computing help |
Disc quota and usage information are provided via the "quota" command, available on the DPO terminals and Linux Teaching System servers. You run the quota command from a terminal window. To open a terminal window click on the following icon
quota
        Used Quota %age
user123 33M  512M  6%
Which means that user user123 has a 512 Mb quota limit and is using 33 Mb of this quota. Note: Once you have deleted files you will need to wait a minute before running the quota command again. There is a delay before the quota statistic are updated.
If you have run the quota command and found that you need or want to clear out files, you can do this using the Unix command line. To list all the files you have in your own filespace along with their sizes, type
cd ; ll -Ra | more
[ That's ell ell, not eleven - it stands for "long listing"]
Pay particular attention to the 5th field of the ll
output - this is
the file size in bytes.
-rw------- 1 xyz99 ugrad 647 Jul 29 13:03 patran.ses.01 -rw------- 1 xyz99 ugrad 647 Jul 29 13:52 patran.ses.02 -rw------- 1 xyz99 ugrad 477 Jul 29 13:54 patran.ses.03 -rw------- 1 xyz99 ugrad 620026 Jul 18 14:10 raid.ps -rw------- 1 xyz99 ugrad 1925120 Sep 28 21:12 spon -rw------- 1 xyz99 ugrad 2356792 Sep 28 21:15 spon2 -rw------- 1 xyz99 ugrad 5643780 Sep 28 21:17 spon3Note that a simple file listing (using "
ll
") will not show files
or directories beginning with a "." - always use "ll -a
" when
investigating quota problems. Some Unix shells don't recognize "ll
" and require
the slightly less shorthand "ls -l
".
If you just do "ll
" or "ls -l
" on its own it'll display the contents of the
current directory.
The "R
" in "ll -Ra
" stands for "Recursive" and lists every file in
every directory (and subdirectory) starting from the current one. That's why you need to "pipe" the output (with "|
") to "more
" which will show
you a page of results at a time.
The "cd
" (change directory) command by itself will always return you to your home directory,
wherever else you might be cd'd into. In the above command the ";
" acts
like a carriage return between commands and allows you to put more than one
command on a line. This conciseness is typical of Unix commands and can be very
powerful (and very confusing).
Files can be deleted using the unix rm
command:
rm spon
will delete the file "spon" in the current directory.
rm spon*
will delete all files in the current directory beginning with "spon" regardless of what characters follow it. Be careful when using wildcards, it's easy to delete more than you intend. A slightly safer version of the above is:
rm -i spon*
which asks for confirmation before deleting each file.
Be careful! This is NOT Windows and there's no Trash Can from which one can instantly recover deleted files. We do make backups, but they happen overnight and won't help if you delete that output file you've just created.
When trying to save disk space you should concentrate on removing very large files, especially executable programs and old plotfiles. Of particular note are files called "core". These can be extremely large and are generally the result of a crashed program. Their practical usefulness is limited and removal is recommended.
Web browser cache files have a significant effect on quota usage, particularly if using more than one of the available "flavours" of Teaching System machine (i.e. Linux or Windows). Mozilla (or a descendant such as Firefox) are the browsers of choice on the Teaching System. Help with Mozilla configuration (including clearing the cache) can be found here.
Most browsers' "preferences" dialogues will provide the option the clear the cache and it's a good idea to do this fairly frequently.
The tidydisk
command may be used to find and selectively remove all
files larger than some given size. With no arguments it locates all
files larger than 100,000 bytes in your HOME directory and all
sub-directories. To set a different file size and directory use (
for example)
tidydisk -s 5000 matlab/plots
which finds all files larger than 5000 bytes in directory matlab/plots.
ProEngineer is often responsible for an excess of quota-eating backup files. Running
proe-purge
will "purge" (remove all the old ProE back-up files in) the current folder.
So click on the following icon
cd
"
command to move into folders. E.g., if you have a folder called 1BRobot
in your Home folder, do
cd 1BRobot
proe-purge
to remove out-of-date ProE files.
| Disk quotas | computing help | |