Inspirational journeys

Follow the stories of academics and their research expeditions

Comptia Linux + 2023 Questions and answer - Part 37

Mary Smith

Wed, 18 Jun 2025

Comptia Linux + 2023 Questions and answer - Part 37

1. Which of the following commands will send output from the program myapp to both standard output (stdout) and the file file1.log?

A) A. cat < myapp | cat > file1.log
B) B. myapp 0>&1 | cat > file1.log
C) C. myapp | cat > file1.log
D) D. myapp | tee file1.log
E) E. tee myapp file1.log


2. What is the purpose of the Bash built-in export command?

A) A. It allows disks to be mounted remotely.
B) B. It runs a command as a process in a subshell.
C) C. It makes the command history available to subshells.
D) D. It sets up environment variables for applications.
E) E. It shares NFS partitions for use by other systems on the network.


3. What is the output of the following command?echo 'Hello World' | tr -d aieou

A) A. Hello World
B) B. eoo
C) C. Hll Wrld
D) D. eoo Hll Wrld



4. Which of the following characters can be combined with a separator string in order to read from the current input source until the separator string, which is on a separate line and without any trailing spaces, is reached?

A) A. <<
B) B. <|
C) C. !<
D) D. &<



5. Which of the following commands will NOT update the modify timestamp on the file /tmp/myfile.txt?

A) A. file /tmp/myfile.txt
B) B. echo 'Hello' >/tmp/myfile.txt
C) C. sed -ie 's/1/2/' /tmp/myfile.txt
D) D. echo -n 'Hello' >>/tmp/myfile.txt
E) E. touch /tmp/myfile.txt


1. Right Answer: D
Explanation:

2. Right Answer: D
Explanation:

3. Right Answer: C
Explanation:

4. Right Answer: A
Explanation:

5. Right Answer: A
Explanation:

0 Comments

Leave a comment