File Tail in Shell

Level 117 keystrokes

tail displays the last lines of a file.

Shell code

# Prints the last 3 lines of log.txt, i.e. the newest log entries
# tail -f would keep printing new lines as they are written
1tail -n 3 log.txt

Output

2024-01-15 17:58:00 Request processed
2024-01-15 17:59:00 Cache cleared
2024-01-15 18:00:00 Server shutdown
Practice typing this code

Practice typing this code. Results are not recorded in the rankings.

Symbols in this code

The symbols you type in this Shell code and how often they appear.

  • -× 1
  • .× 1

More Shell examples at level 1

← Shell typing practice