Linux Ch. 26 Automating Jobs

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

4. How can you temporarily pause a shell script from running in foreground mode in a console session? A. Press the Ctrl+Z key combination. B. Press the Ctrl+C key combination. C. Start the command with the nohup command. D. Start the command with the ampersand (&) command. E. Start the command with the fg command.

A. The Ctrl+Z key combination pauses the job currently running in foreground mode on the console session, so option A is correct

3. When Melanie runs a shell script, she notices that it takes up all of the memory on her Linux system and she needs to stop it. How can she do that? A. Start it with the nohup command. B. Start it with the ampersand (&) command. C. Press Ctrl+C while the script is running. D. Redirect the output using the pipe symbol. E. Use the kill command to stop it.

C. The Ctrl+C key combination stops the job currently running in foreground mode on the console session, so option C is correct.

7. What command allows you to run a shell script at a specific time? A. nohup B. & C. at D. | E. >

C. The at command allows you to schedule a job to run at a specific time, so option C is correct.

10. Jane needs to check on what jobs are scheduled to run automatically for her user account. What command should she use to list the cron table entries for her user account? A. cron B. at C. crontab D. jobs E. nohup

C. The crontab command allows you to list or edit the cron table for your own user account, so option C is correct.

5. How do you determine the default job running in a console session? A. By the PID number B. By the job number C. By a plus sign next to the job number in the jobs output D. By a minus sign next to the job number in the jobs output E. Using the ps command

C. When you list the current jobs using the jobs command, there will be a plus sign next to the default job number, so option C is correct.

8. Nick needs to run a report at midnight every day on his Linux system. How should he do that? A. Use the at command to schedule the job. B. Run the job using the nohup command. C. Run the job using the ampersand (&) symbol. D. Schedule the job using cron. E. Run the job using the atq command.

D. The cron program checks the cron tables for each user account and runs any scheduled jobs automatically, so option D is correct.

1. Frank wants to run his large number-crunching application in background mode on his console session. What command does he need to use to do that? A. > B. & C. | D. >> E. nohup

B. The ampersand character (&) tells the shell to start the command in background mode from the console session, so option B is correct.

6. Barbara has an application running in background mode in her console session and needs to bring it to foreground mode. What command should she use to do that? A. bg B. fg C. nohup D. & E. at

B. The fg command allows you to change a currently running or stopped job to run in foreground mode on the current console session, so option B is correct.

2. What command do you use to disconnect a shell script from the current console so that it can continue to run after the console exits? A. > B. & C. | D. >> E. nohup

E. The nohup command disconnects the shell script from the current console session, so option E is correct.

9. When will the cron table entry 10 5 * * * myscript run the specified shell script? A. At 10:05 a.m. every day B. On May 10th every year C. On October 5th every year D. At 5:10 p.m. every day E. At 5:10 a.m. every day

E. The times specified in the cron table is listed in the order of minute, hour, day of month, month, and day of week. The hour is in 24-hour format, so the specified entry would run the job at 5:10 a.m. every day, making option E correct.

Describe how to run a shell script at a specific time.

The at command allows you to schedule a job to run at a specific time. You can specify the time using an exact value, such as 10:00 PM or using common date and time references, such as 10:00 am tomorrow.

Explain how to run a shell script automatically at a set time every day.

The cron process runs every minute and checks for jobs that are scheduled to run. You must define the jobs to run in the cron tab by using the crontab command.

Describe how to list shell scripts running in background mode within a console or terminal session.

The jobs command allows you to list the commands that are running within the console or terminal session. The output from the jobs command displays both the job number assigned by the shell and the process ID assigned by the Linux system.

Explain how to disconnect a shell script from the console or terminal session so it continues running if the session closes.

The nohup command disconnects the shell script from the shell session and runs it as a separate process. If the console or terminal session exits the shell script will continue running.

Describe how to run a shell script in background mode from your console or terminal session.

To run a shell script in background mode, include the ampersand sign (&) after the shell script command on the command line. The shell will run the script in background mode and produce another command prompt for you to continue on within the shell.

Explain how to stop or pause a shell script running in the foreground on a console or terminal session.

To stop a shell script running in the foreground of a console or terminal session, press the Ctrl+C key combo. To pause a running shell script, press the Ctrl+Z key combo.


संबंधित स्टडी सेट्स

Chapter 4 Adaptive Study Pre-Test

View Set

Basic Japanese Words and Phrases

View Set

Exam 2 (Ch 11-20): Mental Health: Text Review and Evolve NCLEX

View Set

Burnett, Briahna 7- Money Matters- ACC Review

View Set

Module 3 musculoskeletal and neuro practice questions

View Set

Osteoporosis Topic Preparation (slide 25 for the drugs)

View Set