CSCI 111 / EECE 135 Programming Assignment
Electronic Submission Instructions

Professor: Dr. J (Juliano@csuChico.edu)


  1. Introduction

    Electronic submission of programming assignments in this class is simply a matter of making electronic copies of your submission (which could be several files) to a specific directory in a (remote) College of ECC Unix/Linux server. To facilitate this process, this document details how to set up a soft link (or symbolic link, or symlink), also known as a shortcut in MS Windows. Be sure to check if the due date for the assignment is based on any of the College of ECC servers; if so, typing "date" at the prompt will give you the current date and time on that server.

  2. Setting Up a Soft Link to Your Submission/Turn-In Directory (Any ">" starting a line denotes a command prompt. Items in bold font signify user input.)

    The submission/turn-in directory for this class is located in the directory /user/projects/juliano which is accessible from both the Unix server and the Linux server. This submission directory will have a subdirectory that is the same name as your login userid. All electronic submissions must be copied into this subdirectory (or another subdirectory within it) by the specified due date and time.

    The Unix/Linux command we will use to create a soft link is called "ln".  You only have to follow the steps below once, replacing the string userid with your own user ID. Once you have the soft link created, there is no need to repeat the steps given. In the steps below, the soft link (or shortcut) is called csci111 --- you can use any other name, like eece135, for your soft link.

    1. (Optional) First make sure you are in your home directory. If you have just logged in to your account (or have just fired up a terminal session with Konsole or via PuTTY from home), then you should already be in your home directory. A quick way to get to your home directory is by typing the command
        > cd
        > _
      The command "cd" stands for "change directory". By default, without any arguments passed to it, "cd" puts you (back) in your home (or root) directory.

    2. Type the command
        > ln -s /user/projects/juliano/userid ~/csci111
        > _
      The command "ln" creates a soft link called csci111 in your home directory (indicated by the ~ "tilde" character). (Note: Since you are already in your home directory, the tilde and slash in front of the soft link name is really overkill!)

    3. Next, confirm that the above command worked by typing
        > ls -la
          drwxr-xr-x  15 userid s  4096 Aug 15 13:15 ./
          drwx--x--x 130 userid s 12288 Sep  9 21:16 ../
          lrwxrwxrwx   1 userid s    22 Sep 10 10:05 csci111 -> /user/projects/juliano/userid
        > _
      Using the "ls" command to generate a "long" listing of files is a good way to verify that the soft link was actually created. Notice the line for csci111 shows an l for the first entry in the file permissions column --- this indicates that csci111 is a (soft) link.

    4. You can also confirm the correct creation of your soft link by typing
        > ls csci111
          1   2   3   4   5   6   7
        > _
      Here the "ls" command is used to display the contents of your submission directory. If the submission directory has been setup by the time you create your soft link, you should see a list of subdirectories (similar to the ones in the sample session above) for each programming assignment submission this semester.

    5. If you are getting different results or error messages with any of the commands given above, be sure to ask Dr. J if your submission directory has been setup. Another possible explanation is you may not have your Unix account setup or you have not e-mailed Dr. J your Unix account userid.

  3. Submitting a Program by Making a Remote Electronic Copy (Any ">" starting a line denotes a command prompt. Items in bold font signify user input.)

    Assume that in your home directory on the (remote) server you have a file called prog1.cpp for the first programming assignment. If you have correctly set up a soft link based on the instructions above, then to submit the file prog1.cpp to subdirectory 1 in your submission folder, follow the steps below.

    1. (Optional) First make sure you are in your home directory. If you have just logged in to your account (or have just fired up a terminal session with Konsole or via PuTTY from home), then you should already be in your home directory. A quick way to get to your home directory is by typing the command
        > cd
        > _
      The command "cd" stands for "change directory". By default, without any arguments passed to it, "cd" puts you (back) in your home (or root) directory.

    2. (Optional) You can use the "ls" command to list the files currently in the home directory
        > ls
          csci111
          prog1.cpp
        > _
      (Only two are shown in the sample session above - the soft link created earlier, and the file prog1.cpp you want to submit). 

    3. (Optional) You can use the "ls" command to list the contents of the subdirectory 1 in your submission directory by typing
        > ls csci111/1
        > _
      (The command prompt immediately appears indicating that the subdirectory 1 in your submission directory is empty). 

    4. Type the command
        > cp prog1.cpp csci111/1
        > _
      The command "cp" stands for "copy". This command makes a copy of the file prog1.cpp in your home directory in the subdirectory 1 of your submission directory.  

    5. You can confirm that the copy actually worked by typing
        > ls csci111/1
          prog1.cpp
        > _
      Here, the "ls" command is used to display the contents of the subdirectory 1 of your submission directory. It correctly shows that prog1.cpp has been copied, and thus submitted.


    If you are connected to a remote server from home using an SFTP client application, you should see the soft link you created once the connection is established. You can double click on this soft link as if it is a subdirectory and that should take you to your submission directory. You can click and drag files to your submission directory just like any other directory.





Made with Nvu