nerdexam
GIAC

GSNA · Question #211

You work as the Network Administrator for XYZ CORP. The company has a Linux-based network. You are a root user on the Red Hat operating system. You want to see first five lines of the file…

The correct answer is A. head -n 5 /etc/passwd. The head -n 5 /etc/passwd command will show the first 5 lines of the file /etc/passwd.

Linux/Unix System Auditing

Question

You work as the Network Administrator for XYZ CORP. The company has a Linux-based network. You are a root user on the Red Hat operating system. You want to see first five lines of the file /etc/passwd. Which of the following commands should you use to accomplish the task?

Options

  • Ahead -n 5 /etc/passwd
  • Bhead 5 -n /etc/passwd
  • Ctail -n 5 /etc/passwd
  • Dhead /etc/passwd

How the community answered

(24 responses)
  • A
    79% (19)
  • B
    13% (3)
  • C
    4% (1)
  • D
    4% (1)

Explanation

The head -n 5 /etc/passwd command will show the first 5 lines of the file /etc/passwd.

Topics

#head command#Linux commands#/etc/passwd#file viewing

Community Discussion

No community discussion yet for this question.

Full GSNA Practice