next up previous
Next: About this document ...

UNIX COMMANDS
cat filename print filename on screen
cd newdirectory change current directory to newdirectory
cp oldfile newfile copy oldfile to newfile
g++ filename(s) To compile C++ program.
ls list files in current directory
ls a* list files in current directory beginning with the letter 'a'.
more filename list filename on screen one page at a time. hit spacebar to advance
less filename list filename on screen one page at a time. Hit spacebar to advance to next page. Use ctrl-u to go to previous page. Type 'q' to exit.
lpr filename Print filename.
man command Brings up manual pages describing command.
mkdir directory name Make a new directory.
mv oldfile newfile rename oldfile as newfile
pwd what is current directory where you are.
rm filename Remove filename.
rmdir filename Remove a directory that is empty.
vi filename Edit filename using vi editor.
ZZ to exit and save what you have done.
:q! to exit and not save what you have done.
:w to write the current file to disk without exiting vi.
i or a to type words or text. Hit 'esc' key to stop typing words into the document.
h moves the cursor backwards.
k moves the cursor up.
l moves the cursor to the right.
j moves the cursor down.
b moves the cursor back by one word.
w moves the cursor forward by one word.
dw deletes a word.
x deletes a character.
o starts a new line for you to type.
dd deletes an entire line of text.
G moves the cursor to the end of the file.
1G moves the cursor to the beginning of the file.
0 moves the cursor to the beginning of the line.
$ moves the cursor to the end of the line.
/whatever searches for string ``whatever'' in the file and moves the cursor there.
control-u moves the cursor up one screenful.
control-d moves the cursor down one screenful.


 
next up previous
Next: About this document ...
Clare Yu
2000-01-31