Which of the following commands should you use if you need to view the first few lines of the /var/log/boot.msg file?
  1. tail /var/log/messages
  2. grep -l 10 /var/log/boot.msg
  3. head /var/log/messages
  4. cat /var/log/boot.msg
Explanation
Answer - C - You should use the head /var/log/messages command to view the first few lines of the /var/log/boot.msg file.

Key Takeaway: The head /var/log/messages and the less /var/log/boot.msg commands will display the first few lines of the file on screen. The head /var/log/messages command will display the first few lines of the file on screen.
Was this helpful? Upvote!
Login to contribute your own answer or details

Top questions

Related questions

Most popular on PracticeQuiz