Belajar Sendiri

Commands

tail

tail [-n N] [-f] <file>

Risk: Safe

What it does

Shows the last lines of a file: the newest ones in a log.

When to use it

To read what just happened.

Example

$ tail -n 3 orders.log

The 3 newest orders.

$ tail -f orders.log

Keep watching for new lines. Ctrl+C stops.