John works as the Network Technician for Tech Perfect Inc. The company has a Linux-based
network.
John is a root user on the Red Hat operating system. John has two files named foo.txt and
student.txt, which are too long. John wants to view the output of both the files on one screen at a
time. Which of the following commands should John use to accomplish this task?
A.
touch foo.txt student.txt
B.
cat foo.txt | student.txt
C.
cp foo.txt student.txt
D.
cat foo.txt student.txt | less
Explanation:
The cat command concatenates both files foo.txt and student.txt together and | (pipe) will send the
standard output of the cat command to the standard input of the less command, and this will show
the output of both files on one screen at a time.