CMSC 104, Fall 2010

Homework 1

Linux Basics

Out: Tuesday September 7, 2010
Due: Before 11:59 PM on Thursday, September 16, 2010
Note that late homeworks will NOT be accepted.

Objectives:

To become familiar with

Note that this exercise is meant to be performed in the lab with the assistance of your instructor. However, if you do not finish, you must finish on your own time.

Resources:

Assignment:

  1. Log On to the Linux System

    We'll go over how to do this in class.

  2. Check Your Disk Quota and Clean Your Directory

    OIT allocates a fixed amount of disk space (called your "disk quota") to each of the gl system users. It is a good habit to check your disk quota from time to time to make sure that you are not coming close to your allocation. To do this, type: quota -v and press enter.

    If you have already used a large portion of your quota (e.g., the %Used is 90% or higher), you should delete unnecessary files. To do this, type oitcleaner and press enter at the linux prompt.

  3. Getting Ready to Use the xemacs Text Editor

    Before you begin the next part of this exercise, you need to copy a file into your directory. This file is called .emacs and activates certain emacs features (do not worry about what features for now). To copy the file, type the follwing command exactly as it appears:

    		cp  /afs/umbc.edu/users/d/b/dblock/pub/.emacs  .
    	      

    Note that the command has 3 parts (separated by 2 spaces):
    • The first part is cp followed by a space,
    • the second part is the path to the file /afs/umbc.edu/users/d/b/dblock/pub/.emacs followed by a space (there is no space in the path itself at all),
    • and the third part is the period at the end of the command.

    To check that the file is now in your directory, type: ls -a and press enter

  4. Use the xemacs Text Editor to Create an Autobiography

    You will be using the xemacs text editor to create a file called mybio.txt. The file will contain a brief autobiography about you as follows:

    1. Begin by stating your name, major, and class standing (e.g., sophomore).
    2. Then, write a paragraph or two telling me a little bit about yourself. Tell me
      • where you are from and why you chose UMBC for your education,
      • why you chose your major,
      • the best course (college or otherwise) you have had so far and why, and
      • what is your favorite color?
      Do not leave out any of this information!
    3. Finally, you should use the Internet to find answers to the questions below. Each answer need not be more than a few sentences. Your answers should be in your own words, not quoted directly from a source. Please number each answer.
      1. Search for information about Computer Science. After reading several sources, what would you give as a definition of Computer Science?
      2. Read about different areas of study in Computer Science. Pick one area of study you think sounds interesting. Describe the field of study and explain why you think it is interesting. Does it relate to your major in any way?
      3. Research careers in Computer Science. List and briefly describe two career opportunites in the field of Computer Science.
      4. JavaScript is referred to as a scripting language. What is a scripting language? Give 3 examples of other scripting languages.
      5. Give one pro and one con of using the Linux operating system.
      6. What is a "Linux distribution"? Give two examples of Linux distributions.
      7. Read Wikipedia's page on Computer Ethics. Find (read!) and include a link to a recent news article discussing an issue related to computer ethics. (tip: Try searching Google News for recent articles.)
      8. What does W3C stand for? What is its purpose? Who founded it?
      9. Many of us use a search engine (like Google) every day. There are some advanced searching techniques that you may or may not have used ("-", "", site:, etc...). Describe how each technique affects the results of the searches below:
        • windows -microsoft
        • site:www.umbc.edu undergraduate admissions
        • "put my hands in the air"
      10. Find and include a link to a funny joke or cartoon related to computers. (Clean jokes/cartoons only, please!) We'll discuss how to copy and paste into xemacs in class.

    To create your autobiography file, do the following.

    • Enter the emacs editor by typing: xemacs mybio.txt
    • Simply type in the information specified above. Edit any mistakes using the Backspace or Delete key to backspace and the Ctrl-d (where Ctrl is the Control key) sequence to delete a character. When you get to the end of a line, hit the enter key at a reasonable spot instead of the letting the text wrap around to the next line. Remember that xemacs is simply a text editor and does not format things nicely for us.
    • Save your work as you go by pressing Ctrl-x and then Ctrl-s.
    • To save your work and exit xemacs press Ctrl-x and then Ctrl-c. If you have made changes since you last saved, it will ask you if you want to save the file, press 'y' for yes.
    • You will know that you have exited emacs and are again talking to the Linux system if you see the linux1[#]% or linux2[#]% or linux3[#]% prompt.
    • You can check that the file mybio.txt is in your directory by typing: ls
  5. Submitting your assignment using the submit command

    To submit your homework, you will be using the submit command on the gl system. Here is how you use the command: linux1[1]% submit cs104 Hw1 mybio.txt

    After entering this command, you should get a confirmation that submit worked okay. Specifically, the confirmation will say:
    Submitting mybio.txt...OK

    You can check your submission by entering
    linux1[2]% submitls cs104 Hw1

    You should see the name of the file that you just submitted, in this case, mybio.txt.

  6. Log Off the Linux System

    To log off of the system, type logout. Make sure you log off of the computer as well.