Inspirational journeys

Follow the stories of academics and their research expeditions

Comptia Linux + 2023 Questions and answer - Part 41

Mary Smith

Sat, 24 May 2025

Comptia Linux + 2023 Questions and answer - Part 41

1. Which of the following shell redirections will write standard output and standard error output to a file named filename?

A) A. 2>&1 >filename
B) B. >filename 2>&1
C) C. 1>&2>filename
D) D. >>filename
E) E. 1&2>filename


2. In the vi editor, which of the following commands will copy the current line into the vi buffer?

A) A. c
B) B. cc
C) C. 1c
D) D. yy
E) E. 1y


3. Which of the following sequences in the vi editor saves the opened document and exits the editor? (Choose TWO correct answers.)(Select 2answers)

A) A. esc ZZ
B) B. ctrl :w!
C) C. esc zz
D) D. esc :wq!
E) E. ctrl XX


4. When starting a program with the nice command without any additional parameters, which nice level is set for the resulting process?

A) A. -10
B) B. 0
C) C. 10
D) D. 20



5. Which of the following commands will reduce all consecutive spaces down to a single space?

A) A. tr 's' ' ' < a.txt > b.txt
B) B. tr -c ' ' < a.txt > b.txt
C) C. tr -d ' ' < a.txt > b.txt
D) D. tr -r ' ' ' ' < a.txt > b.txt
E) E. tr -s ' ' < a.txt > b.txt


1. Right Answer: B
Explanation:

2. Right Answer: D
Explanation:

3. Right Answer: A,D
Explanation:

4. Right Answer: C
Explanation:

5. Right Answer: E
Explanation:

0 Comments

Leave a comment