Numbered lines and paging

  • nl FILE prints a file with line numbers, which helps when someone says "look at line 7".
  • less FILE is a pager. It shows one screen at a time: Space or PgDn goes forward, b or PgUp goes back, q quits. It never loads the whole file at once, so it opens huge logs instantly.
nl ballad.txt
less ballad.txt

Real world: man pages open in less. Anything you learn here (Space, b, q, and /word to search on a real system) works there too.