Pre-Lab Assignment: Lab #1           Name__________________________________

  1. When first working in Linux students often have trouble distinguishing between commands (such as cd) that perform operations in the file system and the files themselves (the names (or symbols) for the files).
    1. In a UNIX file system, what symbol represents the root directory? _______

    2. What command do you use to change to the root directory? __________________

    3. What symbol represents the current directory you are working in? _______

    4. What symbol indicates a home directory? (Used alone it represents your home directory; concatenated with a username represents that user's home directory.) __________

    5. What command would you use to copy a file named MoreQuestions from the home directory of cpsc to your current working directory?


    6. What symbol(s) represent the directory one level up in the tree from the one you are currently in? _________

    7. What command would you use to change to the directory one level up in the tree from the one you are currently in?


  2. When a computer is turned on or restarted we say that the system is booting. What does this mean? That is, what is happening in during the boot process?




  3. The handout giving an overview of Linux and Unix gives a brief overview of the functions of an operating system. one of those functions is to manage the hardware resources of the computer. Disks (and other auxiliary storage devices) are one such resource.
    1. The handout mentions two specific functions associated with managing files on disk - what are these?


    2. Most of the things you did in lab were related to managing files on disk. Give two examples.



  4. Suppose you are in the LABS subdirectory of the file structure chart handed out in 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-rw-r--.
    1. Can someone other than the owner look at this file? Explain.



    2. Can someone other than the owner make modifications to this file? Explain.



    3. What shell command do you use to get a list of the files in your current directory that also shows the permissions on the files (and other information such as when the files were created)?



  6. 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. There are two problems with this command. What are the two problems?



      Write the correct command to copy the file.



  7. Correct any problems you had with Lab 0 (the introduction to Linux). This includes answers to the UnixQuestions or any problems with sending email. Turn your corrected work in with this pre-lab assignment at the beginning of lab.

  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
       // -------------------------------------------------
  9. What is Java bytecode?




  10. What is white space and how does it affect the readability of a program?