SOME BASIC UNIX COMMANDS

Login the Unix system

login accountname (user must response the password)

Creating a new Directory

mkdir newdirectory (create a new directory named newdirectory )

Changing Directory

cd nextdirectory change from the current working directory to nextdirectory

(i.e nextdirectory becomes your the current working directory)

List the contents of the current working directory

ls (display the list of files in the current working directory)

Create a new file in the current working directory

vim filename (see detail instructions in vim command )

Display the contents of a file

more filename

Delete a file from the current working directory

rm filename

Prints a file to the line printer

lpr filename

Print a file to the laser printer

lpr —Pps filename

Copy a file

cp sourcefile destinationfile

Check the current working directory (where you are)

pwd (print current working directory path)

Rename the file

mv oldfilename newfilename

Compile Ada program

gnatmake filename.adb

Compile Ada program and get a numbered listing of the program with syntax errors marked

gnatmake -gnatbl filename

Compile Ada program, and send the listing and errors messages into a file called temp

gnatmake -gnatbl filename > temp

Run the Ada program

filename ( filename is the file which is already compiled and linked with gnatmake)

Submits a program

submit cpsc120-05 filename.adb

List all files currently in the class directory belonging to the current user

submit cpsc120-05 -ls

Look up help on the given UNIX command

man command-name