Menu
Coddy logo textTech

Viewing The Log File

Part of the Fundamentals section of Coddy's Terminal journey — lesson 49 of 82.

challenge icon

Challenge

Easy

Now that you've seen the full log file, let's practice viewing specific portions of it. When analyzing large log files, you often want to see just the beginning or end rather than the entire file.

Use head to display only the first 5 lines of server.log.

head -n 5 server.log

Tip: The head command is useful for quickly previewing the structure of a log file. In the next lesson, you'll start filtering this log to find specific types of entries.

Try it yourself

Terminal
cat server.log

All lessons in Fundamentals