COMP 235, Fall 2022, Homework 1

The Command Line

Due by August 31 by the start of class.

  1. To answer the below questions, log on to the department server. (There is nothing to answer for this question; I will check the logs on the server to see if you did it.)
  2. The man command is used to get help by reading the manual for a given command, e.g., man ls. Once you’ve opened a man page, how do you exit?
  3. Run uname -r on the department server (cs.monm.edu). Show the output. Briefly explain what it means (hint: try running man uname).
  4. What is the location of the bash command? Hint: first learn about the which command.
  5. The ls command is located in /bin/ls. And yet, you can run ls wherever you are. Briefly describe how the shell locates the ls command when you type it.
  6. Let’s say I am in the /home/rutterback/comp235 directory. How can I move “up” to /home/rutterback without having to type out /home/rutterback?
  7. Consider the command cat /proc/cpuinfo | grep processor. Describe what each part of it is doing. Then, run the command and show the output. What do you think this is telling us about the server?