Using the UNIX tail -f command to watch log files

When troubleshooting a problem in Apache it is a pain to open the log file, find an error, close the log file, and then open it again after you perform some action. This is why ‘tail’ is so handy.

Simply use the command below to view the last 100 lines of a log file, and as new entries are added to the file they are automatically displayed on the screen.

tail -f /the/file/name -n -100

Published by


Speaker, author, consultant, OSS contributor, SoFloPHP UG and SunshinePHP Conf organizer, RunGeekRadio Host, Long distance runner and ultra marathoner.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.