nerdexam
GIAC

GSNA · Question #367

You work as the Network Technician for XYZ CORP. The company has a Linux-based network. You are working on the Red Hat operating system. You want to view only the last 4 lines of a file named…

The correct answer is A. tail -n 4 /var/log/cron. The tail -n 4 /var/log/cron command will show the last four lines of the file /var/log/cron.

Linux/Unix System Auditing

Question

You work as the Network Technician for XYZ CORP. The company has a Linux-based network. You are working on the Red Hat operating system. You want to view only the last 4 lines of a file named /var/log/cron. Which of the following commands should you use to accomplish the task?

Options

  • Atail -n 4 /var/log/cron
  • Btail /var/log/cron
  • Ccat /var/log/cron
  • Dhead /var/log/cron

How the community answered

(20 responses)
  • A
    80% (16)
  • B
    5% (1)
  • C
    5% (1)
  • D
    10% (2)

Explanation

The tail -n 4 /var/log/cron command will show the last four lines of the file /var/log/cron.

Topics

#tail command#log viewing#Linux file utilities#log analysis

Community Discussion

No community discussion yet for this question.

Full GSNA Practice