CS 1005 - Introduction to Programming
Using Unix
These are the Unix commands that you will need to use most often:
-
To copy one file called "oldfile" and call the copy "newfile":
%cp oldfile newfile
-
To rename a file called "oldfile" as "newfile":
%mv oldfile newfile
-
To create a subdirectory called "newdir":
%mkdir newdir
-
To make "newdir" the current directory (change directory):
%cd newdir
-
To make your home directory the current directory:
%cd
-
To list the contents of the directory you are in:
%ls
-
To print a text file called "filename" on the monitor:
%more filename
-
To send a text file called "filename" to the printer:
%lpr filename
Click
here to get more information about Unix from the CCC HelpDesk.
WPI CS WWW Home
Page
WPI WWW Home Page