Lab/Homework 2

  1. Consider the body of text that makes up the World Wide Web with respect to the four qualities that McEnery and Wilson ascribe to corpora in Chapter 2.
    1. Is it representative? If yes: how so? If not: why not?
    2. Is it of finite size? If not, what term could be used to describe it?
    3. Is it in machine-readable form?
    4. Could it be considered a standard reference? If yes: how so? If not: why not?
  2. Use the ls command to find what appears to be the oldest directory in /home. Show me exactly what you typed, and give me all of the information on the oldest directory. Hints:
  3. Go to the directory /corpora/celex/english, using either relative or absolute addressing. Use the pwd command to demonstrate that you got there. Show me exactly what you typed, and exactly what the output was.
  4. Go to your home directory. Go to the directory /corpora/celex/english by using the absolute path. Show me exactly what you typed to get there. Hint: it will start with cd.
  5. Go to your home directory. Use the absolute path to put a copy of the file /corpora/celex/english/README in your home directory. Show me exactly what you typed.
  6. Open emacs. Spend 15 minutes working on the tutorial. When you've done this, write I have spent 15 minutes working on the emacs tutorial.
  7. In your copy of the README file, use emacs to change the word Corpus to Stuff. Save it.
  8. Use the diff command to find all differences between your copy of the README file, and the original version of that file in /corpora/celex/english. Show me exactly what you typed, and show me the output. Hints:
  9. Why shouldn't you use a real word as a password?
  10. Create a directory that your partner can view the contents of, but cannot cd into. Show me the permissions for this directory. (Assumption: you and your partner both belong to the group student. Hints: mkdir chmod)
  11. What is the size, in bytes, of the file /corpora/celex/english/README?
  12. Use the head and tail commands and the pipe operator to display the fifth line of the file /corpora/celex/english/README. Show me what you typed to produce the output. (Hint: you're trying to get the following output:
    epl English Phonology, Lemmas
  13. Use head, tail, wc, the pipe operator, and the redirect operator to create a file named "junk" that contains a count of the number of words on the fifth line of /corpora/celex/english/README. Show me what you typed. (Hint: there are four words. Don't worry about the extra spaces.)
  14. Use head, tail, wc, the pipe operator, and the append operator to add the fifth line of the README file to the junk file that you created in the last step. Show me what you typed. (Hint: your file should contain 2 lines. The first one has the number 4 (and some extra spaces in it). The second line says epl English Phonology, Lemmas. Don't worry about the extra spaces.)
  15. Copy the file /home/kev/helloWorld.pl into your home directory. Check its permissions. What are they?
  16. Try to execute the file. (You do this by typing rehash[ENTER] and then typing helloWorld.pl.) What happens?
  17. Change the permissions of the file so that it is now executable by you *and only by you*. What are the permissions now?
  18. Try to execute it (see above). What happens?