| ..% login: user-id |
log into Unix |
| password: password |
| ..% stty erase del |
set the del key to backspace (in case it's not already set) |
| ..% netscape & |
start the web browser
... then you can Open the desired web site
- e.g.: http://www.cs.ou.edu/cs1323h
... or click on the tiny envelope icon to send or read email
|
| ..% ls -l |
list the contents of the current directory |
| ..% ls -l directory-name |
list the contents of the specified directory |
| ..% mkdir directory-name |
make a new directory |
| ..% rmdir directory-name |
remove a directory (must contain no files) |
| ..% cd directory-name |
go to the indicated directory
(must be child of current working directory) |
| ..% cd .. |
go to the parent directory of the current working directory |
| ..% pwd |
report the current working directory (where you are) |
| ..% exit |
log out |
. (a single period) designates the current working
directory.
..% more file-name |
display the contents of the indicated file on the screen;
space bar continues display |
| ..% lpr file-name |
print the indicated file on the default printer |
| ..% lpr -Pprinter-name file-name |
print the indicated file on the specified printer |
| ..% mv old-file-name new-file-name |
rename the indicated old file |
| ..% mv file-name directory-name |
move the indicated file to the specified directory |
| ..% cp file-name new-file-name |
make a copy of the indicated file |
| ..% rm file-name |
delete (remove) the indicated file |
| ..% pico -w file-name |
create or edit the specified file using a
pint-size commodious editor |
| ..% vi file-name |
create or edit the specified file using a
very incommodius editor
(see below) |
vi has two "modes" - command mode and
text insertion mode;
it starts out in command mode.
i, A, and o put it into insertion mode;
esc (the escape key)
returns it to command mode.
The command-mode commands are:
h |
move cursor left one character |
| j |
move cursor down one line |
| k |
move cursor up one line |
| l |
move cursor right one character |
| x |
delete character at cursor position |
| dd |
delete line that cursor is on |
| /string |
move cursor to next occurrence of string |
| :n |
move cursor to nth line |
| . |
repeat previous command |
| :w |
save file |
| i |
begin insertion mode from current cursor position
(must press esc to return to command mode)
|
| A |
begin insertion mode at end of line
(must press esc to return to command mode)
|
| o |
begin insertion mode on new line
(must press esc to return to command mode)
|
| :q |
exit vi |
Any
..% hugs file-name.hs |
start a Hugs session using the indicated file as a
Haskell script
|
| ..% hugs file-name.lhs |
start a Hugs session using the indicated file as a
Haskell script
(in literate format)
|
| ..% gcc file-name.c |
compile a C program file into the executable file
a.out |
| ..% gcc file-name.c
file-name.o |
compile a C program file and an object file into
the executable file
a.out |
| ..% gcc file-name.c -o
e-file |
compile a C program file into the executable file
e-file |
| ..% gcc file-name.c -c |
compile a C program file into object file
file-name.o |
| ..% a.out |
perform the computation specified in the executable file
a.out |
| ..% a.out > output-file-name |
perform the computation specified in the
executable file a.out and put its output in
output-file-name |
| ..% a.out < input-file-name |
perform the computation specified in the executable file
a.out and gets its input from
input-file-name |
| ..% e-file |
perform the computation specified in the executable file
e-file |
| ..% e-file > output-file-name |
perform the computation specified in the executable file
e-file and puts its output in
output-file-name |
| ..% e-file < input-file-name |
perform the computation specified in the executable file
e-file and get its input from
input-file-name |
Many other combinations are allowed. For example, any number of