NIU Department of Mathematical Sciences
Managing Disk Usage
Even though our system has plenty of disk space, that space is finite.
A disk filling up to capacity is an unpleasant event which can lead
to loss of data. Most importantly, excessive disk use can interfere
with the regular backups we run.
There are many other arguments in favor of cleaning
up your files now and then. By following the hints listed below, you
will earn gratitude of your fellow users and the system manager.
- Remove LaTeX byproducts (.dvi, .aux, .toc, .log files) if you
have the TeX source file, and you don't need to print the file
any time soon. Use wildcards, e.g. rm
*.dvi, but do so with caution -- it will remove all files
ending with `.dvi' without asking. There is also an alias
cleanup which removes all such files in the current
directory.
- Go through your mailbox and delete messages you don't need. This
will also improve the performance of the mail program you use.
- Remove PostScript files which you can easily recreate (e.g. from
.fig graphics files or TeX documents). PostScript files tend to be
big.
- Remove Fortran and C object files (.o) and executables which can
be recompiled and which you don't need right now. It takes only
a few moments to recreate them. Use the -s option when linking
larger programs (or use the `strip' utility) to remove unneeded
objects from them.
- Compress rarely used files (especially text files) with gzip
file. This will create `file.gz', which can then be uncompressed
with gunzip file.gz. This often cuts the size by 50% or more,
especially in case of text files.
- Delete files which have been lying around for months if the chance
of them being needed again are low. Such files have certainly
been backed up to tape several times; some of those tapes are kept
indefinitely. The administrator can get them back if necessary.
- If you use S-Plus, you probably have accumulated many files in
your .Data directory, and a lot of diagnostic output in the
file .Data/.Audit. Remove the data files you no longer need,
and truncate the .Audit file by doing the following:
cd ~/.Data ; tail -50 .Audit >! .Audit.bak ; mv .Audit.bak
.Audit
- Bigger collections of files which won't be needed soon should be
designated for archival storage. Contact the
system
manager and ask him to dump the files to tape and to delete them
afterwards. Or, if you prefer, bring a recordable CD-ROM, and a copy
of the files you specify will be put on it.
- If you do need to work with a large amount of data/software, ask
for temporary extra storage on one of the computers (with the
understanding that the files won't be there `forever', that they
will not be backed up regularly, and will be available on that
machine only).
- Image files (.gif, .jpeg) are usually very large, and cannot be
compressed much. Avoid storing them on the system for extended
periods of time.
- Don't keep your own copies of utility software. If you find a
package which might be useful to others, tell the
manager about
it; in most cases he'll be able to install a publicly accessible
copy on the system.
To find large files use a variant of the following command:
find . -type f -size +200000c -mtime +30 -print | xargs ls -l
This will show all files in the current directory (and subdirectories)
which are 200 KB or larger and haven't been modified in 30 days.
Back to the NIU Math Department Web page
webmaster@math.niu.edu