Special Extra Credit Assignment (Optional)

Due: October 21, 2019
Points: 100


The goal of this extra credit is to encourage you to try different things on Linux, to get used to that system. It is completely optional.

  1. (10 points) The Linux manual has 8 sections. When you see “man(1)”, that means the manual page for the command man is in section 1 of the manual. To see what each section of the manual contains, look at the intro manual page in each section.
    1. What command would you give to print the manual page for the system call creat in section 2 of the manual?
    2. Please write a one-line description of what each section of the manual contains; for example,
      Section 1: user commands
      Section 2: system calls
  2. (10 points) What command(s) would you use to copy the file /home/bishop/hw1-programs/vis-output to your home directory and make it read-only by everyone (owner, group, world).
  3. (10 points) What command would you use to create a subdirectory called “test” in your home directory. With what access permissions is it created?
  4. (10 points) Write a command to print only the last line of the file “/etc/passwd”.
  5. (10 points) Show the command to make a copy of the directory /usr/bishop/hw1-programs, and everything it contains, in your home directory, with one command. Hint: Look at the -r option to the copy command cp(1).
  6. (10 points) When I write data into the file /dev/null, what happens to it?
  7. (10 points) The program ls(1) lists the contents of a directory. But it does not list any files whose names begin with “.” (period). What option would I give to ls to include those files in the output?
  8. (10 points) Every directory contains a subdirectory named “..”. What is that subdirectory? And what is the “..” in the root directory “/”?
  9. (10 points) The file /usr/share/dict/words contains a list of English words. Write a command that will put all words in that file that contain the character sequence “gry” in the file GRY.
  10. (10 points) How would I list all files that begin with “a” and end with “.txt”?

UC Davis sigil
Matt Bishop
Office: 2209 Watershed Sciences
Phone: +1 (530) 752-8060
Email: [email protected]
ECS 36A, Programming and Problem Solving
Version of October 11, 2019 at 12:26AM

You can also obtain a PDF version of this.

Valid HTML 4.01 Transitional Built with BBEdit Built on a Macintosh