How do I create a soft/symbolic link to a directory?
In the directory you want to create the link from:
%> ln -s <path to directory>

What is the absolute path to the current directory?
%> pwd

How do I set the classpath for Java? What about jar files?
Probably the best option is to set the CLASSPATH environment variable in your .cshc file (found in your home directory). You may want to save a copy first in case you screw up.
Somewhere below the setenv HOME line add:
setenv CLASSPATH "."
setenv CLASSPATH "${CLASSPATH}:${HOME}/path"

Where path is the path from you home directory to the resource of interest. If for example you stored your classes in ~/java/classes you would add
setenv CLASSPATH "${CLASSPATH}:${HOME}/java/classes/"
The setenv CLASSPATH "." ensures the current working directory is always in the CLASSPATH. :(colon) is used to seperate different possible paths. Add as many varient of the second line as needed to cover all the resources.
Note that jar files also need to be in the classpath. For example, you could add:
setenv CLASSPATH "${CLASSPATH}:${HOME}/java/packages/jam.jar"

How does one execute a 'script' (like a dos .bat file)?
Create the file with commands in it, in the same way.
Then make it executable with 'chmod +x <filename>'
Then you can run it like any other program. (./filename)
You can do more than that; look up 'man tcsh' for a tcsh script, or the
shell of your choice.

How does one open the cd-rom drive on another computer?
Try logging on to the other computer:
%> rlogin computer
%> eject cdrom
%> eject -l cdrom
Note that the programmers may have disabled this command.

How do I access the harddrive of the local machine at university?
%> cd /vol/scratch

How do I write messages to other users via the xconsole?
Firstly the person your sending to has to have 'allow messages' turned on. This can be done by typing mesg y in the console window. A message can then be sent using the following:
write [username]
I am typing a message to myself
Press Ctrl+D when you're finished entering the message.

Ping won't work from my workstation (but man ping shows it exists).
The ping command is not on the standard users path. Either do a need sysdirs to add the relevant directories to your path or invoke it explicitly as /sbin/ping.

How do I enable numlock by default when I login?
One possible solution for kde is outlined here: http://www.denniswarner.net/lfp/num_lock.html
Another possible solution involves setting it in the bios. This may not be possible due to passwords or a operating system override.
If you know of a better solution please contact me.

How do I prevent huge KDE coredumps on NetBSD?
Add limit coredumpsize 0 to your .cshrc file.
Commit it immediatly with source .cshrc.

How do I compress a file of directory? What about extraction?
To tar a directory, use the command:
%> tar cf filename.tar directoryname
e.g. tar cf assign2.tar assign2
To Zip a directory, use the command:
%> zip filename.zip directoryname/*
e.g. zip assign2.zip assign2/*
To check what is in a tar file, use the command:
%> tar tf filename.tar,
e.g. tar tf assign2.tar

To uncompress and untar a file, use the commands:
%> uncompress "filename.tar.Z"
%> tar -xvf "filename.tar"
%> tar xzvf filename.tar.gz

I've got a dual boot x86 machine. How do I access Linux files (ext2) from Windows(vfat/fat32) and vice-versa?
Here's a good article I found using Google. http://www.linuxworld.com/linuxworld/lw-2001-01/lw-01-legacy.html http://www.penguin.cz/~mhi/fs/Filesystems-HOWTO/Filesystems-HOWTO-6.html
LTools (Win98 reads/writes ext2) http://www.it.fht-esslingen.de/~zimmerma/software/ltools.html

Unix tutorials/links

Idaho State University - A Basic UNIX Tutorial
unixhelp - University of Edinburgh
Surrey (local) - UNIX Tutorial for Beginners.
Man pages online
Linux Cookbook - Tasty treats for everyday use.
Tucows Linux

A Word on Windows

"Why can't my Windows box be more like Unix?"
Some apps that bridge the divide: Peruse, Virtuawin (Fear the four windows of apocalypse), filec.
Why not just use Linux you ask? Hmm, good question...

C tutorials

Google Directory
Programming in C - UNIX System Calls and Subroutines using C.


To make Emacs highlight C++ programs:
M-x font-lock-mode or M-x global-font-lock-mode (........M = Alt or Esc on a PC)

Commands that can be placed into your .emacs file to achieve the desired effect.
(setq column-number-mode t); SHOW COLUMN NUMBERS
(setq frame-title-format "%b"); SHOW FILENAME IN WINDOW HEADER

In Emacs, use Alt + Tab + Tab to get latex commands.

Spell checking:
M-x ispell-buffer
space - skip
r - user replace
i - add to dictionary.

Keys in telnet mode.


Email Request For Comments

RFC 821
Simple Mail Transfer Protocol (SMTP)
RFC 1521
5.1 - Quoted-Printable Content-Transfer-Encoding
RFC 1893
Enhanced Mail System Status Codes
RFC 1894
Delivery Status Notification
RFC 1939
Post Office Protocol - Version 3 (POP3)
RFC 2152
UTF-7: A Mail-Safe Transformation Format of Unicode
RFC 2505
Anti-Spam Recommendations for SMTP MTAs

Telnet Email Send

Telnet directly to a mail server to write email. (Only works from within MCS)
Instructions based on this page and work done in comp306.

You do/type this

Server responds with

Telnet to hostname on port 25

220 (then identifies itself - possibly with several lines of 220 + text)

HELO your_domain_name or whatever

250 (followed by human readable message)

MAIL FROM:you@hostname.com (ie, your email address) Note: you will not be popular with the MCS programmers if you use something other than your own email address!

250 is syntactically correct (or similar)

RCPT TO:them@someplace_else.com (email address you want to send to)

250 is syntactically correct


Tells you to send data then CRLF period CRLF at end

You type your message then CRLF period CRLF (ie, type a period on a line by itself then hit ENTER)
If you want you can start your message with and optional subject line or cc by typing subject: and/or cc: on their own lines.

250 QUIT Signoff message

Telnet Email Receive

Telnet directly to a pop3 mail server to receive your emails. (Needs to be the mail server your inbox resides on)
Instructions based on this page and RFC1939.

You do/type this

Server responds with

Telnet to hostname on port 110

+OK QPOP (version 2.53) at <server name> starting.

HELO <username>

PASS <password>


+OK #msgs #bytes


Lists a line for each message with its number and size in bytes

RETR msg#

Display message number msg#.

TOP msg# #lines

the header for msg# and the first #lines of the message text

DELE msg#

marks message number msg# for deletion from the server


This deletes any messages marked for deletion, and then logs you off of the mail server

Operating Systems and end-of-line characters.

If you are using FTP to transfer text files from your PC to a UNIX server, make sure you use ASCII mode and NOT BINARY! DOS uses an extra character (CR/LF) to indicate end of line, where UNIX only uses (LF). Using ASCII removes the extra character. If this is not done, your script may fail to run (perl). In emacs the extra character will often appear as ^M.

Another way to correct the PC -> Unix problem is to remove the CR from the end of each line using one of the following commands from the shell:
%> col < infile > outfile
%> cat infile | col > outfile

ps auxwww | grep username | sort | more

Force Browser Reload
Internet Explorer users: Click Refresh while holding down the CTRL key.
Netscape users: Click Reload while holding down the SHIFT key.

Commands - Get to know your konsole

finger - user information lookup program
date - display the date and time
who - display who is using this server
whoami - A movie by Jackie Chan - returns your user name
top - machine usage details
clear - clear the screen
echo something - display the argument something on the screen
wc - word count: shows number of lines, words, and characters
xcalc - on-screen calculator
cp - make copies of files
man - manual
more - display a text file on the screen, page by page, allows searching.
less - a superior version of more, allows backwards scrolling too
mv - move files to a different place
rm - remove files
ls - list files in directory
chmod - change the protection mode of the file
cd - change your current directory
pwd - display your working directory
mkdir - make dir
tar - tar zpxvf file to extract a file
rmdir - remove dir
du - display disc usage of a directory du -ms .
gzip - compression util
gunzip - uncompress
xkill - terminate a console with a left click
diff - display differences between two files
grep - find all occurences of a text pattern in a file
sort - sort a file into order line by line
lpr - print out a file on the printer
ps -a - shows current processes
rusers - shows current users
users - shows people currently using the same machine
zip - eg zip proj1.zip *.java
write - display a message to another console
last - displays list of those who most recently used this computer
..... - eg. write auser |where auser is the name of someone using the same computer as your konsole.
uptime - This will give you a quick summary of the status of the machine. The last three numbers it prints show the average load on the machine for the past 1, 5, and 15 minutes respectively.
soffice - Staroffice from the console
wincenter - I'll be damed there is Windows in there
rdesktop -g 800x600 dell Login on to dell windows machine.
rdesktop -K dell
find <path> -name "<filename>"


Roundup - Review of several majors.