You are on page 1of 2

BASIC UNIX & LINUX COMMANDS

Checking Account Details:

Account details can be checked


(Including print quota level) using: acc OR pp
Disk Quota Used: rquota
Detailed Disk Usage: disk_guess
Web page: https://status.cse.unsw.edu.au/Control_Panel/

Basic File Management:

To list files info on current directory ls -al


To remove a file: rm <filename>
To copy a file: cp <filename> <New_filename>
To move a file or directory: mv <Old_filename> <New_filename>
To remove a directory: rm -rf <dir name>
To create a directory: mkdir <dir name>

Print Commands:

To print from an application (eg: xpdf) lpr -P<printer>


To print from xterm: lpr -P<printer> <filename.txt/ps/pdf>

NOTE: Your document may not be readable or even not printed if you print directly
from the command line from the xterm. So please ensure that you open and print the
files using the appropriate application, for example do open .pdf file with xpdf
filename.pdf then issue a print command in the print-dialog as shown above:
lpr –P<printer>

To print a job without the login


watermark:
- double-sided lpr -P<printer>.dup <filename>
- single-sided lpr -P<printer>.sgl <filename>

To check a printing queue: lpq -P<printer>


To remove a print job: lprm -P<printer> <job no.>
To remove job once it has started
printing (also remove all your jobs): lprm –P<printer> -a
To place multiple pages onto
a single physical page: mlpr -<no. logical pages>
-P<printer><filename>

NOTES:
1. The job number for a particular job can be obtained by running the lpq
command as shown above.
2. If printing double-sided, TWO pages are deducted from your print quota.

Change the font size:


Inside an xterm press Ctrl-Button 3 (the right mouse button). The VT fonts
menu appears which allows you to change the font size of that xterm.

FOR FURTHER INFORMATION :

FAQ Page: http://taggi.cse.unsw.edu.au/


Manual Pages for each command: man <command name>
Consult the Help Desk

CSE Help Desk (02)9385 5438 Email: helpdesk@cse.unsw.edu.au


Floppy Disk Commands:

Disk contents: mdir


Copy file (floppy - home dir) mcopy a:/<filename> .
Copy file (home dir - floppy) mcopy <filename> a:
Delete file mdel a:/<filename>
Format a floppy disk: mformat a:

Note: Please view the man page for mtools for


a complete description
Compressing Files and Directories:

To compress a file: gzip <filename> or zip<filename>


To decompress a file: gunzip <filename> or unzip<filename>
To compress a directory: tar -cvf <archive name >.tar <dir name>
To decompress a directory: tar -xvf <archive name>.tar
To tar and zip a directory: tar -zcf <archive name>.tar.gz <dir name>
To untar a .tar.gz or .tgz file: tar -zxvf <filename>.tar.gz or
tar -zxvf <filename>.tgz
Viewing/ Printing PDF and PS files:

PDF files can be viewed using either acroread or xpdf


PS files can be viewed using gv or gnome-gv

Convert a file from PS to PDF ps2pdf <filename.ps>


Convert a file from PDF to PS pdf2ps <filename.ps>

Formatting text files for printing:

Use the aps command: aps <option> <filename> | lpr -P<printer>

Eg. Print a text file with no border/


header in PORTRAIT form aps -~B -P -~H file.txt | lpr -P<printer>

Portrait mode
no border
(the ~ is used to turn OFF the border and
header option. )
Basic LaTeX Commands:

Process the formatted source file: latex <filename>.tex


Preview the latex (.dvi) file: xdvi <filename>.dvi
Convert dvi file to ps: dvips <filename>.dvi -o
Print a dvi file: dvips <filename>.dvi | lpr -P<printer>
Create a pdf file: pdflatex <options> <commands>

Note: Please view the man page for pdflatex


for a complete description
Book Commands:

To enter the booking system: book


To book a terminal once in the
Booking system: book <start time - finish time><day/ date>
To claim a booked terminal: claim
To book a terminal using a graphical interface, use tkbook instead of book
(Or goto: https://status.cse.unsw.edu.au/Control_Panel/ )

CSE Help Desk (02)9385 5438, http://www.cse.unsw.edu.au/~helpdesk


Email: helpdesk@cse.unsw.edu.au

You might also like