Contact UsComputer Science Department
500 College Avenue
Swarthmore, PA 19081
Email: info at cs.swarthmore.edu
Copyright 2009 Swarthmore College. All rights reserved.
basic unix commands
There are many commands that one can use on the unix command line. A few of these are very important, and you will find yourself using them frequently during your CS experience.
|list files and directories|
|cp|| cp file file.bac
cp file dir/.
|copies a file (use -r for directories)|
|mv||mv file newf||moves or renames file|
|rm||rm file||deletes a file (use -r for dirs)|
|less||less filename||view file, hit q to quit|
|cd||cd dir||change directory (may need full path)|
|mkdir||mkdir newdir||make new directory|
|pwd||pwd||print working dir (where you are)|
Other things to note: if you want to run a program, you can usually just type the program name, like python, firefox, or gvim. If you type man any_command_name you should find a detailed list of instructions for using that command, as well as any options the command might have.