AP Computer Science A

Turning in Work

In this class you'll be asked to turn in work in a number of different forms, but arguably the most important involves uploading files to course server. There are a few different ways that you might do this, but all of them involve getting your file(s) into your folder on our server at

/home/yourUserID/forInstructor/

For electronic documents—programs, text files, etc.—this is where you turn in your work, and where I'll pick up your documents for evaluation.

Logging on to the server

As part of this class, you have an account on our course server. With your userID and your password, you can use your computer's Terminal to log on to the server using a Secure Shell, (ssh):

$ ssh userID@server.name
userID@server.name's password:
Welcome to Ubuntu 14.04.4 LTS (GNU/Linux 3.13.0-85-generic x86_64)
.
.
userID@server:~$ 

Once you've logged on to the server, you'll find yourself in your home directory, which initially will be empty. Here you can use standard commands to interact with the server:

You can use the following symbols to help you navigate the file structure:

Note that directories and files are referred to using either an absolute path or a relative path:

Once you have finished using the server, be sure to log out using the exit command or the ^d command.

Transferring files from your own computer to the server

If you're not currently logged on to the server, the easiest way to upload your document is probably the Secure Copy command, scp which has the the same general format as before:

scp <source> <destination>

Assuming I've just launched a Terminal and I want to upload a file from a directory code located on my Desktop, here's what I'd do:

$ cd ~/Desktop/code
$ ls
HelloWorld.java
$ scp -P 1030 HelloWorld.java studentID@server.name:~/forInstructor
studentID@server.name's password:
HelloWorld.java                             100% 1025     1.0KB/s   00:00
$

In the same way, you can use the scp command to download a file from the instructor, located in his Public directory on the server, to the current directory on your computer:

$ scp -P 1030 studentID@server.name:/home/rwhite/apcs/Public/instructors_file.txt .
instructors_file.txt                        100%    0     0.0KB/s   00:00

Creating a zipped directory

If you have multiple files that you need to upload, or a directory of files that you need to upload, you need to first zip those files together into a single file. To do this:

Details about your Home folder

Your forInstructor folder is the only place that you can turn in work—emailed work, printed work, or file submitted on a USB stick won't be accepted—so make sure that you take that fact into account when you're working against a deadline.

Your home directory ~ and all its subdirectories are owned by you, and you usually have complete read, write, and execute privileges in that folder. Among other things, this means that if you submit two assignments with the same name, the assignment you submitted more recently will overwrite the first one, and there's no getting it back. So be sure to name your program appropriately according to the assignment instructions given in class, on the assignment, or on the course calendar.

We have material to cover and a schedule to keep, so late assignments are typically not accepted.