Computer Science, asked by ankushkatle99, 1 year ago

The command syntax to display the file 'sample.txt' one page at a time is
एक समय में फ़ाइल 'sample.txt का एक पृष्ठ प्रदर्शित करने के लिए कमांड सिटैक्स है।
Select one:
A. cat sample.txtcat sample.txt
O B.cat sample.txt|more
cat sample.txt more
O C. none of the mentioned
उल्लेखित कोई नहीं
D. man sample.txt>more
man sample.txt>more​

Answers

Answered by QGP
0

Command Line

To solve the question, we need an understanding of three commands that we use on the command line.

 \rule{320}{1}

cat

The \tt cat command is used to view files. It prints out the complete file.

So, \texttt{cat sample.txt} will print out the complete file at once. If the file is long, you will be only able to see the last part, as much as possible, on your Terminal Screen.

more

The \tt more command helps to view the text of a file one page (or one screen) at a time.

Looking at the question, this command is going to be useful.

man

The \tt man command helps to view the "manual", or the help pages of some particular command.

For example, \texttt{man cat} will show the help page of the \tt cat command.

The Pipe Operator: |

The Pipe Operator (|) directs the output of the command on its left to the command on its right.

So, for example, \tt ls|more will output the contents of the \tt ls command one screen at a time.

 \rule{320}{1}

The Answer:

It's clear that we need to use the \tt cat as well as the \tt more commands. They will be connected using the Pipe Operator (|).

So, the Answer is Option (B) \texttt{cat sample.txt|more}

Similar questions