Title: Try different tail options that were not demonstrated
Time: 5-10 minutes
Purpose: Try different settings for viewing a file to get information in a more relevant way.
Introduction:
In the demos we saw how the tail
command would return the last 10 lines of a file by default. We also tried using tail to automatically watch for updates to a file. This update happens about once a second. So what if viewing just the last 10 lines of the file was too much or too little? What if you didn’t need to get an updated view of a file every second? (Refreshing files that have big updates too often can have a performance impact on your machine or the server.)
Activity:
- Try to get
tail
to return a specific number of lines that you require. - Get
tail
to only update once every 5 seconds when using the-f
argument.