Text filters · Question 11 of 12

logrotate renames access.log at night and creates a new, empty file. Why is tail -F better than tail -f for following it?

1 answer is correct. Hard Created with AI

Show answer

Answer

  • B tail -F reopens the file by its name as soon as it has been replaced

Explanation

tail -f follows the file descriptor it opened, i.e. the renamed old file, and then shows no new lines. -F is equivalent to --follow=name --retry.

Certifications & exams

Which exam comes next?

You can already practise for 51 exams, and 16 are up for a vote. See all certifications with their official information, cast your vote or suggest your exam.

See all certifications