Using Unix® Computers

© Copyright 1999 University of New Haven

Home Page

The Ctrl (called "control") key is like the Shift key- hold it down while pressing a letter key. For example, to type Ctrl-D, hold down the Ctrl key while pressing the D key.

To forcibly terminate the program currently running, type Ctrl-C. Use it to get out of "desperate" situations.

Every command line that you type inside shell must end with the Enter key before the computer will respond to it. The Del key can erase individual characters typed on a line, Ctrl-W can erase the last word typed, and Ctrl-U can erase an entire line before the Enter key has been pressed.

The computer signals its readiness to accept your commands by responding with a prompt like:

system2>

at the beginning of a new line.

If you are not able to access you Unix directory as a network drive, using Samba, then you can instead upload a file through a Telnet window using the command sequence:

     cat  >myfile Enter-key

          Paste file contents here...

     Enter-key Ctrl-D

which creates or replaces a pre-exsiting myfile with the contents pasted into the Telnet window.


Useful Commands Summary

cat myfile
    List myfile contents

cb <myfile.c >neatfile.c
     Write C program from myfile.c into neatfile.c "beautified" (neatly indented)

cc myfile.c
     Compile C program in myfile.c

cc -P myfile.c
     Show output resulting from macro pre-processing myfile.c but do not compile

exit
     Log out of UNIX (Ctrl-D also logs out.)

lint -p myfile.c
     Read C program in myfile.c, reporting errors in detail

lp -P1 myfile
     List myfile contents on printer (Currently defunct!)

ls
     List file names

ls -l
     Complete directory listing. (That option is minus ell!)

mv oldfile newfile
     Move (i.e. rename) oldfile to newfile

passwd
     Change your current password

rm myfile
     Destroy myfile

./a.out
     Run the most recently compiled program

./a.out < infile
     Run previously compiled program with input coming from file infile instead of the keyboard

./a.out > outfile
     Run previously compiled program with output going to file outfile instead of the terminal screen

Non-standard Additional Decstation UNIX Shell Commands and their Functions

ctel <myfile.c
     Obtain a style profile of C program in myfile.c.

dos2ult myfile
     Convert contents of myfile from MS-DOS format to UNIX format.

g++ myfile.cpp
     Compile C++ program in myfile.cpp

pastel <myfile.p
     Obtain a style profile of Pascal program in myfile.p.

pb <myfile.p >neatfile.p
     Write Pascal program from myfile.p into neatfile.p "beautified" (neatly indented)

pc myfile.p
     Compile Pascal program in myfile.p (Currently defunct!)

perl myfile.pl
     Run Perl program in myfile.pl

Home Page