DELAPARRA
Index
Color
NL
Category: CLI commands

tail

Explained by Updated

What is tail?

tail: Tail — Show the last N lines of a file. -f follows new output in real time. tail shows the last lines of a file, ten by default. tail -n 50 app.log shows the last fifty lines, which is usually where the most recent errors are. tail -f keeps following the file and prints new lines as they are written. It is the classic way to watch a log while you reproduce a problem in the browser. tail -F also keeps working when the log file is rotated and replaced.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about tail

What should you keep in mind with tail?

Combine it with grep to filter, as in tail -f app.log | grep -i error. In Laravel, storage/logs/laravel.log is the usual file to follow. For containers, the equivalents are docker logs -f and kubectl logs -f, because container logs go to standard output rather than a file.

At a glance

CategoryCLI commands
Explained by
Updated

More CLI commands terms

All terms starting with T

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.