CSCI 3215 (Advanced UNIX Command-Line Tools), Fall 2022:
Reading Quiz 1

Credit:
15 points.

Reading

Be sure you have read, or at least skimmed, the reading for 8/29 and 8/31.

Instructions

For most courses I ask that you answer questions on reading quizzes using only the assigned readings for the course. For this course, however, while I mean for you to be able to answer the questions based on the assigned readings, plus sometimes man and info pages, you can consult any source you like. (So, Web searches are AOK.) It's okay to talk to classmates about this assignment as you usually do, but I want each person to at least skim all the reading. Include the Honor Code pledge in what you turn in, either the full pledge or just the word “pledged”. For these quizzes by doing this you are also saying you have at least attempted or skimmed all the reading it covers.

Please put the pledge in the same document as your answers, so I don't overlook it, and please be sure to include your name somewhere in the file, so when I print it for grading I know whose work it is.

You may write out your answers by hand and scan them, or you may use a word processor or other program, but please submit PDF or plain text in the “turn-in” folder I have set up for you on Google Drive. (So, no word-processor files, including Google Docs, and no links to other Google Docs.)

Questions

  1. (2.5 points) Suppose you have a file with a very long name, and you want to rename it. What command do you use, and do you have to type the whole name?

  2. (2.5 points) Suppose you have been working on a program, editing and compiling repeatedly. Do you have to type the whole command to compile every time, or is there a way to get bash to show you the most recent use and repeat it?

  3. (2.5 points) When reading a man page, what key do you use to page through it a screenful at a time? Is there a key you can use to back up a screenful? How about to exit man and return to the prompt immediately?

  4. (2.5 points) Supposedly there are man pages for all C library functions, but when you type man printf you don't get the one for a C library function, but something else. How do you get the man page for the C function?

  5. (2.5 points) The man page for the date command says that to access the full documentation you should use the command info coreutils 'date invocation'. Try that. The information presented seems to indicate that somewhere there are some examples. Read enough about info to figure out how to view those examples. How do you do it?

  6. (2.5 points) When you type a command in a terminal window, the system tries to find an executable with that name somewhere. Where does it look, and is it the same for everyone?




2022-09-28