tail

Linux · Text · available in the simulator

What it does

Output the last part of files.

Syntax

tail [-n líneas] [-f] [archivo...]

Options and parameters

  • -n N

    Last N lines

  • -f

    Output appended data as the file grows.

    tail -f /var/log/syslog
  • -c N

    Last N bytes

  • -n

    Output the specified last lines; defaults to 10.

    tail -n 50 archivo.log
  • -F

    Same as -f, but follow by filename and retry if rotated.

  • -c

    Output the specified last bytes.

Usage examples

  • tail archivo.txt
  • tail -n 50 log.txt
  • tail -f /var/log/syslog
  • tail -f app.log
  • tail -n 50 archivo.log
Practise tail

Related commands