What does the - option do in the more command?

The - option in the more command is used to specify that the command should read from standard input (stdin) instead of a file. This allows you to pipe the output of another command into more.

For example, you can use it like this:

cat largefile.txt | more -

In this case, cat largefile.txt outputs the contents of largefile.txt, and the more - command takes that output and displays it one screenful at a time. This is useful for viewing the output of commands that generate a lot of text.

0 Comments

no data
Be the first to share your comment!