Terminal and shell

Watch a log file live

See new lines appear in a log file as they're written, to catch a problem as it happens.

Fill these in once
  1. Follow the file
    Terminal
    tail -f app.log

    Press Ctrl+C to stop watching.

Check it worked

  1. Show just the last 50 lines
    Terminal
    tail -n 50 app.log
  1. Follow the file
    Terminal · Ubuntu / Debian
    tail -f app.log

    Press Ctrl+C to stop watching.

Check it worked

  1. Show just the last 50 lines
    Terminal · Ubuntu / Debian
    tail -n 50 app.log
  1. Follow the file
    PowerShell
    Get-Content app.log -Wait -Tail 20

    Press Ctrl+C to stop watching.

Check it worked

  1. Show just the last 50 lines
    PowerShell
    Get-Content app.log -Tail 50

New to logs? I explain it in plain English on Layman Terms.