Linux Paper About Shells Bash's Etc.

1295 Words6 Pages
Unit 3 Chapter Exercises (NT 1430.U3.GA1) Chapter 7, p. 251, Exercises 1, 3, 4, 8 1. What does the shell ordinarily do while a command is executing? What should you do if you do not want to wait for a command to finish before running another command? Answer: The shell waits for it to finish before it gives you another prompt and allows you to continue (Sobell, 2012). Run the command in the background by using an ampersand (&) just before the Return stroke that ends the command line. (Answers.com, 2013) 3. What is a PID number? Why are these numbers useful when you run processes in the background? Which utility displays the PID numbers of the commands you are running? Answer: It is an identification number that is automatically assigned to each process when it is created (info.org, 2005). When you want to use the kill command, the syntax requires the PID Number (Answers.com, 2013). You can use the PS (process status) utility to display the PID numbers of running commands (Answers.com, 2013). 4. Assume that the following files are in the working directory: $ ls intro notesb ref2 section1 section3 section4b notesa ref1 ref3 section2 section4a sentrev Give commands for each of the following, using wildcards to express filenames with as few characters as possible. a. List all files that begin with section. Answer: $ ls section* b. List the section1, section2, and section3 files only. Answer: $ ls section[1-3] c. List the intro file only. Answer: $ ls i* d. List the section1, section3, ref1, and ref3 files. Answer: $ ls *[13] (Sobell, 2012) 8. Give an example of a command that uses grep a. With both input and output redirected. Answer: $ grep \$Id < *.c > id_list b. With only input redirected. Answer: $ grep -i suzi < addresses c. With only output redirected. Answer: $ grep -il

More about Linux Paper About Shells Bash's Etc.

Open Document