Pre-Lab Assignment: Lab #1

  1. In a UNIX file system, what symbol represents each of the following important directories?

    1. the root directory for the system _________

    2. the current directory you are working in ___________

    3. the directory one level up in the tree from the one you are currently in _________

    4. your home directory _________

  2. The root directory in a Unix system contains a subdirectory named bin. What does the bin directory contain?



  3. Modern operating systems come with windowing systems and desktop management programs to make using the computer easier but most programmers who use UNIX operating systems (such as Linux) spend much of their time working in the shell. What is a shell?



  4. Suppose you are in the LABS subdirectory of the file structure chart handed out the first day of class (a separate sheet with blanks to fill in). What sequence of shell commands would you type to do the following:

    1. get into ingram's Simulation directory _________________________________

    2. then see a list of the files there _____________________________

    3. then create a subdirectory name Projects _______________________________

  5. Suppose the permissions on a file are -rw-r--r--.
    1. Can someone other than the owner look at this file? Why or why not?



    2. Can someone other than the owner make modifications to this file? Why or why not?



    3. What shell command do you use to determine the permissions on a file?



  6. What is
    1. the full pathname of your home directory?

    2. What is a shortcut name for your home directory?


  7. Suppose you are currently in bozo's home directory of the file structure chart handed out in class.

    1. What is the relative pathname of the file



    2. Suppose you are still in bozo's home and you want to copy the file into bozo's games subdirectory. Suppose you type in the command


      You will get an error message. What is wrong with this command and how should it be corrected?



  8. Suppose your task is to write a Java program that will print out the following message (including the row of equal marks):
            Computer Science, Yes!!!!
    The following is an outline of the program. Complete it as follows:
    1. In the documentation at the top, fill in the name of the file the program would be saved in and your name as the author.
    2. Add the code for the main method to do the printing.
    // *******************************************************************
    // File Name:
    // Author:
    // *******************************************************************
    public class CSYes
       // -------------------------------------------------
       //  The following main method prints an exciting
       //  message about computer science
       // -------------------------------------------------