Useful commands

Handy Unix commands for use with exam machines.

Using an exam preparation desktop

 

Moving around

cd directoryname to move into a directory below the one you are currently in
cd .. to move to the directory one level above the one you are currently in
cd /exam/hons/april to move into a directory whose location you know
pwd to find out which directory you are in (present working directory)
ls to list the files in the directory
ls -l to list the files in the directory with details of size, creation date etc

 

Creating files and directories

mkdir directoryname to create a new directory
rmdir directoryname to remove a directory
cp oldfilename newfilename to copy a file
mv oldfilename newfilename to rename a file
mv oldfilename ./directoryname/ to move a file to a different directory

 

Editing files

emacs filename to open the file in the emacs editor
ctrl-x-s, ctrl-x-c to save the changes and exit the file

 

Creating files to print

If the file you want to print does not contain any .ps or .eps graphics then you should follow these modified rules:

pdflatex filename.tex to latex a .tex file that does not contain .ps or .eps graphics
xpdf filename.pdf to view the .pdf file that latex creates

 

 

If the file you want to print does contain .ps or .eps graphics then you should use these more traditional commands:

latex filename.tex to latex a .tex file that does contain .ps or .eps graphics
xdvi filename.dvi to view the .dvi file that latex creates
dvips -Ppdf filename.dvi -o filename.ps to create a (.pdf friendly) .ps file from a .dvi file
ps2pdf filename.ps filename.pdf to create a .pdf file from the .ps file

 

Printing files

Note that the above instructions mean you've now created a .pdf file (via one of two routes), this allows you to use the same print command, irrespective of whether the file contains any .ps or .eps graphics.

examprint filename.pdf to print the .pdf file

 

Using the memory stick

Plug the memory stick into the USB port.

mount /media/flash to mount the memory stick
unmount /media/flash to unmount it

You can access the memory stick using a file manager system like Konqueror (remembering that the stick is under Root Directory /media/flash) or in Unix (remembering the stick is /media/flash)

 

Backing the machine up

The machines are automatically backed up twice each day.

 

Non-honours exams

Course organisers still have responsibility for these exam paper templates. Solutions should not be included at the end of the question paper although it’s ok to do this for exams where students write the answers in the gaps on the paper.

The non hons directories do contain course.tex and solutions.tex and status.tex has been set up to work for inf1a, cs2a etc but it is unlikely that the lecturers will use them (they don’t have to). Status.tex does not work with course codes containing numbers so use a word instead of the number e.g. infonea, cstwoa.

 

Honours exams

course.tex is the blank file which the course lecturers should type their questions into. A copy has been put into each of the course directories.
solutions.tex is the blank file which module lecturers should type their solutions into. A copy has been put into each of the course directories.

The December, April and August directories each contain a directory called exam-macros. Only ITO staff can edit files in this directory.

 

exam-macros/status.tex is used to set the cover page for the exam.  Each course needs to have a 5 line section within status.tex.  If a course is new, a new section should be added to status.tex with the details of that new course.

 

 

The following elements of the cover page are setting using status.tex:

status (by commenting out - putting a % at the beginning of the line - the lines which aren't correct of the type \def\status{\internal}). This controls the header which says whether the paper is for internal scrutiny, for the external examiner, or the final version.
title by putting the correct title for the module in the \papertitle{***} line
type by putting the correct type (inf3.inc, inf4.inc, msc.inf, inf3msc.inc, inf4msc.inc in the \papertype{***} line.
date and time set the examYear value at the top of the file and the day and month values in the \paperdate{day}{month} line. Only use numbers, ? or x cause the latex to fail.

Status.tex does not work with course codes containing numbers so use a word instead of the number e.g. infonea, cstwoa.

 

Also:

inf3.inc, inf4.inc, msc.inf, inf3msc.inc, inf4msc.inc, barnden.inc and irving.inc These files contain the heading, External Examiner and Chair of BoE info for each type of paper.
any_two_of_three.inc, qu1_and_either_qu2_or_qu3.inc These files set the rubric for the paper. The lecturers set which one should be used within module.tex
honsexam.sty This file dictates the formatting of the exam paper and should only be changed after consultation with Julian Bradfield.
ukdate.sty, epsf.sty I’ve no idea what these do but it seems to be good to have them in exam-macros.