CompTIA Linux+ XK0-005 Practice Question

Which command will efficiently allow a monitoring script to display the last five entries of a log file and continue to output any new entries as they are appended, while also ensuring that file rotations are handled correctly by tracking the file descriptor?

  • tail -f -n 5 /var/log/webserver.log

  • tail -F -n 5 /var/log/webserver.log

  • tail -n 5 /var/log/webserver.log

  • tail -F /var/log/webserver.log

CompTIA Linux+ XK0-005
Scripting, Containers, and Automation
Your Score:
Settings & Objectives

Check or uncheck an objective to set which questions you will receive.

SAVE $45
Bash, the Crucial Exams Chat Bot
AI Bot