Inspirational journeys

Follow the stories of academics and their research expeditions

Comptia Linux + 2023 Questions and answer - Part 40

Mary Smith

Mon, 17 Mar 2025

Comptia Linux + 2023 Questions and answer - Part 40

1. Which of the following commands is used to change options and positional parameters for a running Bash?

A) A. history
B) B. set
C) C. bashconf
D) D. setsh
E) E. envsetup


2. Which of the following commands replaces each occurrence of 'bob' in the file letter with 'Bob' and writes the result to the file newletter?

A) A. sed '/bob/Bob' letter > newletter
B) B. sed s/bob/Bob/ letter < newletter
C) C. sed 's/bob/Bob' letter > newletter
D) D. sed 's/bob/Bob/g' letter > newletter
E) E. sed 's/bob, Bob/' letter > newletter


3. From a Bash shell, which of the following commands directly executes the instruction from the file /usr/local/bin/runme.sh without starting a subshell? (Please select TWO answers.)(Select 2answers)

A) A. source /usr/local/bin/runme.sh
B) B. . /usr/local/bin/runme.sh
C) C. /bin/bash /usr/local/bin/runme.sh
D) D. /usr/local/bin/runme.sh
E) E. run /usr/local/bin/runme.sh


4. Regarding the command:nice -5 /usr/bin/progwhich of the following statements is correct?

A) A. /usr/bin/prog is executed with a nice level of -5.
B) B. /usr/bin/prog is executed with a nice level of 5.
C) C. /usr/bin/prog is executed with a priority of -5.
D) D. /usr/bin/prog is executed with a priority of 5.



5. Which shell command is used to continue background execution of a suspended command?

A) A. &
B) B. bg
C) C. cont
D) D. exec
E) E. :&


1. Right Answer: B
Explanation:

2. Right Answer: D
Explanation:

3. Right Answer: A,B
Explanation:

4. Right Answer: B
Explanation:

5. Right Answer: B
Explanation:

0 Comments

Leave a comment