0% found this document useful (0 votes)
37 views2 pages

Basic Unix Commands

This document provides summaries of basic UNIX and Linux commands in 3 sentences or less: To check account details and print quota, use the acc or pp command. Basic file management commands include rm to remove files, rm -rf to remove directories, and mkdir to create directories. Printing commands like lpr print files and lpq checks the printing queue.

Uploaded by

Snehal Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views2 pages

Basic Unix Commands

This document provides summaries of basic UNIX and Linux commands in 3 sentences or less: To check account details and print quota, use the acc or pp command. Basic file management commands include rm to remove files, rm -rf to remove directories, and mkdir to create directories. Printing commands like lpr print files and lpq checks the printing queue.

Uploaded by

Snehal Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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

Basic File Management:

To remove a file: rm <filename>


To remove a directory: rm −rf <dir name>
To create a directory: mkdir <dir name>

Print Commands:

To print: lpr −P<printer> <filename>

To print a job without the student number watermark


Double Sided: lpr −P<printer>.dup
Single Sided: lpr −P<printer>.sgl

To check printing queue: lpq −P<printer>


To remove print job: lprm −P<printer> <job no.>
Place multiple PS pages onto
a single physical page: mlpr −<no. logical pages>
−P<printer><filename>

NOTE: The mlpr command can only be used for PS files. To print PDF files using
mlpr first convert them to PS using pdf2ps <filename.pdf> and then print the newly
created PS file using mlpr

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.

FOR FURTHER INFORMATION :

FAQ Page: http://www.cse.unsw.edu.au/faq


Manual Pages for each command: man <command name>
Consult the Help Desk
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>


To decompress a file: gunzip <filename>
To compress a directory: tar cvf − <archive name >.tar
> <dir name>
To decompress a directory: tar −xvf <archive name>.tar

Viewing/ Printing PDF and PS files:

PDF files can be viewed using either acroread or xpdf

Print through acroread (PDF): lpr −P<printer>


Print through xpdf (PDF): |lpr −P<printer>
Print through gv (PS): lpr −P<printer>

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

You might also like