Chapter 6: Useful Odds 'n Ends


All users are allocated a certain amount of disk space on the file system for their personal files, usually about 100 Gb. If you go over your quota, you will receive email notification. Also, in the case that you do go over your quota, you will likely want to delete old or unneeded files, as you will start to lose data from your running jobs on the supercomputer.

To check your current quota and how much of it you have used, type

$ fslquota


The df command reports on the space left on the file system. For example, to find out how much space is left on the fileserver, type

$ df .


The du command outputs the number of kilobyes used by each subdirectory. Useful if you have gone over quota and you want to find out which directory has the most files. In your home-directory, type

$ du

Hint: By default, df, du, and many other UNIX utilities list file sizes in bytes. This is fine, but the information is much more useful to a user if it is in units of KB, MB, or GB. The -h option will convert from bytes to one of these larger units and can be used with df, du, ls, and just about any other UNIX utility.


This command compresses a file using the gzip compression format. For example, to compress science.txt, type

$ gzip science.txt

This will zip the file and place it in a file called science.txt.gz

To unzip the file, use the gunzip command.

$ gunzip science.txt.gz


file classifies the named files according to the type of data they contain, for example ascii (text), pictures, compressed data, etc.. To report on all files in your home directory, type

$ file *


The bash shell (the command line interface) keeps an ordered list of all the commands that you have entered. Each command is given a number according to the order it was entered.

$ history (show command history list)

You can also use the exclamation character (!) to recall commands easily.

$ !! (recall last command)
$ !-3 (recall third most recent command)
$ !-5 (recall 5th command in list)
$ !grep (recall last command starting with grep)

You can increase the size of the history buffer by typing

$ export HISTSIZE=2000
The variable name, the "=", and the variable value must not be separated by space.


fslquota Display information about your quota and how much you have used
df -h Display statistics about disk usage on filesystems in human readable format
du -h filename Display the size of the file filename in human readable format
gzip filename Compress a file into the gzip format
gunzip filename.gz Uncompress a gzip file
file filename Display specific information about the file type
!! Recall last command
!-number Recall the command that was run number commands ago
!prefix Recall the last command starting with prefix