Linux chapter 9

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

What command is used to view and modify user jobs scheduled to run with cron? crontab cron ps sched

crontab

Which of the following commands will show the current user cron jobs that have been created for the currently logged in user? cronjobs --list cron --list cron -l crontab -l

crontab -l

You have run the top command successfully, but realize that the q key on the keyboard has suddenly stopped working. What is another way that you can exit out of the top program? ctrl-c ctrl-q ctrl-w ctrl-x

ctrl-c

What is the name given to a process not associated with a terminal? child process parent process user process daemon process

daemon process

After a background process has been started, what command below can be used to move it to the foreground? fg fgnd fgd b2f

fg

You have started a job running in the background that you want to now bring to the front so that you can watch it execute. Which of the following commands can be used to display the job's output to the terminal? a. disp b. fg c. front d. jobs -f

fg

A process spawning or initiating another process is referred to as . a child process forking branching parenting

forking

Which process has a PID of 1 and a PPID of 0? the kernel itself ps init/systemd top

init/systemd

A runaway process that is faulty and consuming mass amounts of system resources . is a zombie process is an orphaned process has a PPID of Z is a rogue process

is a rogue process

Which command can be used to see processes running in the background? bg jobs ps -% fg

jobs

Which of the following commands can be used to only show jobs that have been paused. a. jobs -p b. jobs -s c. jobs -n d. jobs -r

jobs -s

Which of the following commands will send a process's resources to /dev/null to kill the process for process ID 1357? sigkill 1357 killall 1357 kill -15 1357 kill -9 1357

kill -9 1357

Which of the following commands can be used to see files that are currently being used by a specific process ID (PID)? psfiles lsof pstatus pids

lsof

Which of the following can be used preceding a command to prevent a process from terminating when the parent process terminates? bg runat & nohup

nohup

Every process has a process ID and a . fork process daemon child process parent process

parent process

Which of the following commands can be used to terminate a process by the process name? a. kill b. pkill c. stop d. pskill

pkill

Which command entered without arguments is used to display a list of processes running in the current shell? pgrep list pid ps

ps

Which of the following commands will show a list of process names along with their process ID (PID)? (Choose two.) ps proc top jobs

ps, top

What command is used to display the lineage of a process by tracing its PPIDs until the init daemon? psbranch pstree psparent pshead

pstree

Which of the following characters, when pressed while the top program is running, will allow you to change the niceness of a process? a. n b. p c. r d. d

r

While the top command is running, what key can be pressed to change the nice value of a process? n r p v

r

Which of the following commands will most likely increase the chance of a process receiving more time slices? renice 0 renice 15 renice -12 renice 19

renice -12

The at command is used to _______. schedule processes to run periodically in the background schedule processes to run periodically on a recurring basis in the future schedule processes to run at a single instance in the future schedule processes to run in the foreground

schedule processes to run at a single instance in the future

Which command is used to gain real-time information about processes running on the system, with the most processor-intensive processes appearing at the beginning of the list? Ps ps -elf top pstree

top

Which of the following commands can be used to schedule very frequent recurring tasks, such as running once every minute? run watch do while

while

Which of the following states describe a process that is waiting for a parent process to release its PID? wait suspended zombie dead

zombie

Nice values are used to affect process priorities using a range between . 0 and 20 0 and -19 −19 and 20 −20 and 19

−20 and 19

What option can be used with the ps command to display an entire list of processes across all Terminals, including daemons? -a -f -e -l

-e

A system administrator wants to allow most users to be able to run cron jobs, but wants to specifically prevent a couple of users from doing so. Which of the following files could the administrator edit to disallow these users from creating cron jobs? /etc/cron.deny /etc/cron.d/cron.deny /etc/cron.allow /etc/cron.d/cron.allow

/etc/cron.deny

In which directory would a system administrator store scripts that should be run monthly by the cron daemon? a. /var/cron/monthly b. /etc/crontab/monthly c. /var/crontab/monthly d. /etc/cron.monthly

/etc/cron.monthly

Where are scheduled commands stored on Ubuntu Linux systems? /var/spool/cron/atjobs /etc/at/ /tmp/at /var/spool/at

/var/spool/cron/atjobs

Where are individual user tasks scheduled to run with the cron daemon stored on a Fedora system? /etc/crontab .. /var/spool/cron /var/spool/cron/username

/var/spool/cron/username

Which of the following is the highest value that can be set for the nice value which would result in a greater chance of a lower priority? a. 20 b. 19 c. 10 d. 0

19

What kill level signal cannot be trapped? 1 9 3 15

9

If a process state is currently showing as uninterruptible sleep, which letter will show in the output of the ps command? S U N D

D

To kill a process running in the background, you must place a % character before its process ID. True or False?

False

Which of the following statements is true? (Choose all that apply.) If /etc/at.allow exists, only users listed in it can use the at command. If /etc/cron.allow exists, only users listed in it can use the cron command. If /etc/cron.deny exists and /etc/cron.allow does not exist, any user not listed in /etc/cron.deny can use the cron command. If /etc/cron.allow and /etc/cron.deny exist, only users listed in the former can use the cron command, and any users listed in the latter are denied access to the cron command. If a user is listed in both /etc/cron.allow and /etc/cron.deny, then /etc/cron.deny takes precedence and the user cannot access the crontab command.

If /etc/at.allow exists, only users listed in it can use the at command. If /etc/cron.allow exists, only users listed in it can use the cron command. If /etc/cron.deny exists and /etc/cron.allow does not exist, any user not listed in /etc/cron.deny can use the cron command.

Which kill signal terminates a process by taking the process information in memory and saving it to a file called core on the hard disk in the current working directory? SIGINT SIGKILL SIGQUIT SIGTERM

SIGQUIT

When you run the ps command, how are daemon processes recognized? The terminal is listed as tty0. There is a question mark in the TTY column. There is an asterisk in the STIME column. There is a "d" for daemon in the terminal identification column.

There is a "d" for daemon in the terminal identification column.

As daemon processes are not associated with terminals, you must use an option such as -e alongside the ps command to view them. True or False?

True

How can you bypass the wait function and send a user process to the background? This cannot happen once a process is executing; it can be done only when the command is started by placing an ampersand (&) after it. This cannot happen; only daemon processes can run in the background. You can use the ps command. You can use the Ctrl+z key combination and the bg command.

You can use the Ctrl+z key combination and the bg command.

The pkill command terminates . all instances of a process with the same PPID all instances of a process with the same PID all instances of a process with the same priority all instances of a process with the same name matched by a regular expression

all instances of a process with the same name matched by a regular expression

A system administrator wants to schedule a task to run at 11 pm, but knows that she will not be in the office at that time. Which of the following commands can she use to schedule this task to run that night while she is at home? exec run at atq

at

Which of the following commands will display a list of the pending jobs to be run? (Choose all that apply.) at -l atq at -q at -d

atq, at -q, at -l

Which of the following command can be used to remove a job from the list of pending jobs? (Choose all that apply.) at --remove atrm at -r at -d

atrm, at -r, at -d


Set pelajaran terkait

The Glass Castle Section 1 Questions (Pages 3-57)

View Set

Chapter 25 - The High Risk Newborn (Maternity) EAQ's

View Set

chap 14 psych, chapter 13, chapter 12, chapter 11 psych

View Set

Health Assessment: chap 1-6 prepu

View Set

Chapter 44: Drug Therapy to Regulate Calcium and Bone Metabolism

View Set