All students are allocated a certain amount of disk space on the file system for their personal files, usually about 100Mb. If you go over your quota, you are given 7 days to remove excess files.
To check your current quota and how much of it you have used, type
% quota -v
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
This is one way to compresses a file. For example, to zip arglist.txt, type
% gzip arglist.txt
This will zip the file and place it in a file called arglist.txt.gz
To unzip the file, use the gunzip command.
% gunzip arglist.txt.gz
The commands zip and unzip compress and uncompress files in Windows Zip format. Compressed files have the extension .zip. Unlike most other Linux compression commands, zip does not delete the original files. For example, to zip arglist.txt, type
% zip arglist arglist.txt
This will zip the file and place it in a file called arglist.zip
To unzip the file, use the unzip command.
% unzip arglist.zip
An important use of zip is to compress a directory along with its contents, like you have been doing before turning in your homework assignments. To zip the morestuff directory, use the command
% zip -r morestuff morestuff/
This will zip the entire directory and place it in the directory morestuff.zip.
The tar program is another way to pack many files and directories into a single file for easy transport, optionally compressed. (It was originally for backing up files onto a tape drive; its name is short for "tape archive.")
To create a archive file with the gzip format from a directory.
% tar -czf morestuff.tar.gz morestuff
To extract.
% tar -xf morestuff.tar.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 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)
If you are using the C shell, you can 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
% set history=100
M.Stonebank@surrey.ac.uk, © 24th August 2001