Inspirational journeys

Follow the stories of academics and their research expeditions

Comptia Linux + 2023 Questions and answer - Part 39

Mary Smith

Thu, 15 May 2025

Comptia Linux + 2023 Questions and answer - Part 39

1. What does the ? symbol within regular expressions represent?

A) A. Match the preceding qualifier one or more times.
B) B. Match the preceding qualifier zero or more times.
C) C. Match the preceding qualifier zero or one times.
D) D. Match a literal ? character.



2. In the vi editor, how can commands such as moving the cursor or copying lines into the buffer be issued multiple times or applied to multiple rows?

A) A. By using the command :repeat followed by the number and the command.
B) B. By specifying the number right in front of a command such as 4l or 2yj.
C) C. By selecting all affected lines using the shift and cursor keys before applying the command.
D) D. By issuing a command such as :set repetition=4 which repeats every subsequent command 4 times.



3. Which of the following files, located in the user home directory, is used to store the Bash history?

A) A. .bash_history
B) B. .bash_histfile
C) C. .history
D) D. .bashrc_history
E) E. .history_bash


4. Which of the following commands displays the contents of a gzip compressed tar archive?

A) A. gzip archive.tgz | tar xvf -
B) B. tar ztf archive.tgz
C) C. gzip -d archive.tgz | tar tvf -
D) D. tar cf archive.tgz



5. Which grep command will print only the lines that do not end with a / in the file foo?

A) A. grep '/$' foo
B) B. grep '/#' foo
C) C. grep -v '/$' foo
D) D. grep -v '/#' foo



1. Right Answer: C
Explanation:

2. Right Answer: B
Explanation:

3. Right Answer: A
Explanation:

4. Right Answer: B
Explanation:

5. Right Answer: C
Explanation:

0 Comments

Leave a comment