nerdexam
GIAC

GSNA · Question #337

You want to change the number of characters displaying on the screen while reading a txt file. However, you do not want to change the format of the txt file. Which of the following commands can be…

The correct answer is D. more. The more command is used to view (but not modify) the contents of a text file on the terminal screen at a time. The syntax of the more command is as follows: more [options] file_name Answer: A is incorrect. The concatenate (cat) command is used to display or print the contents…

Linux/Unix System Auditing

Question

You want to change the number of characters displaying on the screen while reading a txt file. However, you do not want to change the format of the txt file. Which of the following commands can be used to view (but not modify) the contents of the text file on the terminal screen at a time?

Exhibit

GSNA question #337 exhibit

Options

  • Acat
  • Btail
  • Cless
  • Dmore

How the community answered

(53 responses)
  • A
    6% (3)
  • B
    9% (5)
  • C
    13% (7)
  • D
    72% (38)

Explanation

The more command is used to view (but not modify) the contents of a text file on the terminal screen at a time. The syntax of the more command is as follows: more [options] file_name Answer: A is incorrect. The concatenate (cat) command is used to display or print the contents of a file. Syntax: cat filename For example, the following command will display the contents of the /var/log/dmesg file: cat /var/log/dmesg Note: The more command is used in conjunction with the cat command to prevent scrolling of the screen while displaying the contents of a file. Answer: C is incorrect. The less command is used to view (but not change) the contents of a text file, one screen at a time. It is similar to the more command. However, it has the extended capability of allowing both forwarB, Dackward navigation through the file. Unlike most Unix text editors/viewers, less does not need to read the entire file before starting; therefore, it has faster load times with large files. The command syntax of the less command is as follows: less [options] file_name Where, Answer: B is incorrect. The tail command is used to display the last few lines of a text file or piped

Topics

#more command#text file viewing#Linux utilities#terminal output

Community Discussion

No community discussion yet for this question.

Full GSNA Practice