LUX 205 - Introduction to UNIX/Linux

Review for Third Test

The following questions are provided to help you study for the third test. Do not expect to see these exact questions on the test.

  1. What are two of the things that the dd utility does that cp does not do?

  2. df and du are related, but not identical. What are they for?

  3. The text names two files to search for when you are trying to locate garbage files on your system. What are they?

  4. What is the top utility for? How do you terminate a process with top?

  5. How is free similar and different from the df command?

  6. What is a PID? What are two utilities that will report PIDs to you?

  7. How do you make a process run in the background in Linux?

  8. How can you end a process that is running in the background, using a command from chapter 8? What information do you need to know about the process to end it?

  9. What is the Windows utility that is similar to ifconfig? What general information does it provide to you?

  10. What can you learn from a ping to an IP address?

  11. Why is traceroute more informative than a ping to a distant device? What more can you learn from it?

  12. What information should you expect to get from the netstat command? How is the information provided by netstat -p different?

  13. Describe what a flowchart for a shell script should look like. What information should it display?

  14. Compare a shell script to a pseudocode representation of that shell script. What makes one different from the other?

  15. What tool did I instruct you to use in making a flow chart?

  16. For what purpose did the text tell you to use a hashbang in a shell script? Why does it work, when it looks like it should not? Write a line that uses the hashbang notation recommended by the text.

  17. How could a correctly written line like the one in the question above fail to work properly?

  18. What is the purpose of the test command? What are the two possible logical outputs of this command? What are the two possible numeric outputs of this command?

  19. The text showed you two ways to use the test command to determine whether the contents of two variable match. What are they?

  20. How do you determine the outcome of a test command?

  21. What are the three classic Boolean operators discussed in chapter 7? How are they implemented in the test command?

  22. Explain the logic of two expressions linked by Boolean operators, and what must be so for the entire phrase to be true or false.

  23. Some commands take a bit of time to produce their intended results. What are the two factors described in chapter 7 that contribute to this time?

  24. The clear command may take longer to run than we might like. What does the text recommend we do to speed up the performance of this command when it is used several times in a script?

  25. What method is used in the text to make a variable available to more than one script in a single session?

  26. What is a function, with regard to shell scripts?

  27. How is a function structured in a shell script"

  28. How many arguments may we expect to be able to pass to a shell script function? How are they referenced in the function?

  29. What would be the result of using single quotes instead of back quotes where they are needed?

  30. What are some of the shell script troubleshooting tips the text offers?