13
PROGRAMMING PROJECT POLICIES AND UNIX INTRO Sal LaMarca CSCI 1302, Fall 2009

PROGRAMMING PROJECT POLICIES AND UNIX INTRO Sal LaMarca CSCI 1302, Fall 2009

Embed Size (px)

Citation preview

PROGRAMMING PROJECT POLICIES AND UNIX INTROSal LaMarcaCSCI 1302, Fall 2009

Programming Project Policies

All programs must compile and run on Odin using Java 1.6.0 (Sun’s JDK)

Odin is a Linux server that can be accessed via an SSH connection to odin.cs.uga.edu

You may develop your code in an IDE on other operating systems, but it is your job to transfer all files to Odin and to compile, run, and test on Odin using Java 1.6.0

Start projects early and ask for questions as early as possible.

Programming projects requirements1. All Java source code for the project2. A Makefile to compile all of your source code3. A plain text file named readMe.txt that

contains detailed instructions on how to compile your source code and how to run your program. The readMe file should also contain a brief description of the files included in the project

4. All Java source code must be commented thoroughly. Each class, function, and significant blocks of code must be well commented.

Getting your Odin account

Present your student id to the student workers in Boyd 307, and ask them for your Unix accounts

They should give you slips of paper containing login information for your Odin and Atlas accounts

I highly recommend changing both your Odin and Atlas passwords to the same password

If the student workers in 307 do not have an Odin account for you, please email [email protected]

Boyd 307 open lab

The lab includes several Linux machines and Windows machines

To login to the Windows machines, use the user id given to you for your Unix accounts, and the password is your 9-digit 810 number

To login to the Linux machines, use the user id and password that you use to login to your Odin/Atlas account

Connecting to Odin via SSH

Mac, Unix, and Linux users can open up a command prompt and issue the command ssh odin.cs.uga.edu

Windows users must download and run an SSH client like putty to connect to Odin http://

www.chiark.greenend.org.uk/~sgtatham/putty/download.html

File transfer to/from Odin

Must use an SFTP (secure file transfer protocol) client to transfer files to and from Odin

Filezilla is a free SFTP client that has an easy to use GUI

http://filezilla-project.org/

Unix commands (case matters) passwd

Changes your password

pwd Shows the current

working directory man command

Get help using the manual page

man pwd

ls List the contents

of a directory ls -la ls -all

cd Change directory

echo Echo’s a string to

standard output

Unix keyboard shortcuts

CNTL+Z Stops/suspends the

current command fg

Restore the last suspended command

CNTL+C Kills some

commands or processes

Tab Autocompletes

commands and file names

Up and down arrows Scrolls through

command history

Unix special command symbols ~

Home directory cd ~

Change to home directory

. Currently directory

.. Parent directory cd ..

Change to parent directory

> Redirect output of a

command to a file ls -all >

directoryContents.txt |

Pipes the output of the command to the left to the input of the command to the right

ls -all | less

File commands

mkdir Create a directory mkdir project1

touch Create a file touch file.txt

cp Copies a file cp file1.txt file2.txt

rmdir Remove a directory rmdir project1

rm Remove/delete a file rm file.txt

mv Moves or renames a file mv file1.txt

/usr/file2.txt mv file1.txt file2.txt

Chmod command

Changes the permission of a file or directory chmod u+rwx file.txt

Permit the file’s owner to read, write, and execute file.txt

chmod g-rwx file.txt Remove read, write, and execute permissions

from the file’s group chmod o-w file.txt

Remove write permissions for other users who are not owners of file.txt

chmod a+rw file.txt Permit all users to read and write file.txt

Misc commands cat

Lists a file’s contents cat file.txt

which Lists the complete

path of a command less

Scroll through a file quota -v

Check how much space you have in your account

exit Logs you off

ps Shows the current processes

you are running kill

Kills a process First lookup a process’s id

with ps, then issue a kill command like

kill 12778 kill -9 12778

You must issue kill commands to stop processes that are taking up a lot of resources (like an infinite loop)

Failure to stop an out of control processes may result in having your account frozen or suspended by system administrators