Module 9 Flashcards

1
Q

When will the following entry in the user crontab be executed?

1 2 3 4 * /bin/go_catch_Pokemon

  • 1:02 am on March 4
  • January 2nd at 3:04 am
  • Monday, February 3rd at 4:00 am
  • 1 minute after 2 am on the 3rd of April
A
  • 1 minute after 2 am on the 3rd of April
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you bring the “sleep 500” process to the foreground?

[user1@okuda 145]$ jobs

[1] Running sleep 400 &

[2]- Running sleep 500 &

[3]+ Running sleep 600 &

  • $ %
  • $ fg %2
  • Type CTRL+z followed by fg and press the enter key.
  • $ fg sleep 500
A
  • $ fg %2
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which one is NOT a Linux scheduling tool?

  • anat
  • at
  • anacron
  • cron
A
  • anat
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you place a command that’s running in the foreground into the background?

  • Type CTRL+b followed by bg and press the enter key.
  • Type CTRL+c followed by bg and press the enter key.
  • Type CTRL+d followed by bg and press the enter key.
  • Type CTRL+z followed by bg and press the enter key.
A
  • Type CTRL+z followed by bg and press the enter key.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

When the same program is executed twice it will have the same PID.

  • True
  • False
A
  • False
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What value will be displayed at (1) and (2)?

$ ls file1     (file1 exists)
$ echo "$?"
(1)
$ ls file2     (file2 does not exist)
$ echo "$?"
2
$ echo "$?"
(2)
  • (1) 0, (2) 0
  • (1) 0, (2) 2
  • (1) 1, (2) 2
  • (1) $1, (2) $2
A
  • (1) 0, (2) 0
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

A process may have multiple parent processes.

  • True
  • False
A
  • False
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you start a sleep command to run in the background?

  • $ bg | sleep
  • $ sleep | bg
  • $ sleep %
  • $ sleep &
A
  • $ sleep &
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do you display the background processes running in the current shell?

  • $ lsbg
  • $ jobs
  • $ ps -bg
  • $ bg -l
A
  • $ jobs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Find the match.

SIGHUP

SIGINT

SIGKILL

SIGTERM

A

SIGHUP 1

SIGINT 2

SIGKILL 9

SIGTERM 15

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Every process has a process ID and a_______.

  • fork process
  • daemon
  • child process
  • parent process ID
A
  • parent process ID
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

A process spawning or initiating another process is referred to as _____.

  • a child process
  • forking
  • branching
  • parenting
A
  • forking
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

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

  • crontab
  • cron
  • ps
  • sched
A
  • crontab
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the name given to a process not associated with a terminal?

  • child process
  • parent process
  • user process
  • daemon process
A
  • daemon process
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

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
A
  • all instances of a process with the same name matched by a regular expression
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

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 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.
A
  • 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.
17
Q

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
A
  • is a rogue process
18
Q

Which process has a PID of 1 and a PPID of 0?

  • the kernel itself
  • ps
  • init/systemd
  • top
A
  • init/systemd
19
Q

What kill level signal cannot be trapped?

  • 1
  • 9
  • 3
  • 15
A
  • 9
20
Q

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
A
  • schedule processes to run at a single instance in the future