Linux/Unix Command Summary
File Manipulation
ls - List files in the current directory
ls -l List files in the current directory (including owner, group, permissions, and date/time last changed)
ls|more - List files in the current directory one page at a time
rm filename - remove file
cp filename1 filename2 - copy filename1 to filename2
mv filename - rename a file
cat filename - display text file to screeen
cat filename|more - display text file to screeen one page at a time (space to get next page)
more filename - display text file to screeen one page at a time (space to get next page)
chmod filename - change the permissions on a file (see man pages for details)
 
Directory Commands
pwd - print working(current) directory
cd - change working(current) directory
mkdir directory - create a directory
rmdir directory - remove an empty directory
cp -R directory1 directory2 - recursively copy directory1 to directory2
rm -r directory recursively remove directory and all its files
 
Printing
lp -d printer file - print file to printer printer
(This may not work ... let me know.)
 
Getting Additional Help
man command - obtain system help on command
man -k keyword - do a keyword search on system manual pages
Editors
vi - very powerful, but cryptic ( then ZZ to exit)
emacs - very powerful, but also cryptic (^X^C to exit)
sse - user-friendly editory developed by our own Professor Blahnik (available only on CompSci
pico - simple editor (^X to exit)
 
Programming
gcc -o program program.c - compiles a C program (executable will be program)
g++ -o program program.c - compiles a C++ program (executable will be program
 
Miscellaneous
"stty erase backspace" - typing this at the command line sets your backspace key (hit the appropriate key to be your backspace in place of backspace)
reset - If you are getting funny characcters on your screeen this will fix it!
clear - clear the screen
who - tells you who is logged on to the system
^C - stops a running command or program