cmdxray / commands / tail

What does tail do?

print the last part of files.

▸ Explain your own tail command →

tail examples, explained

$ tail -f -n 100 log.txt

  • tailprint the last part of files
  • -ffollow — keep printing new lines as the file grows
  • -nprint the last N lines
  • 100value for -n
  • log.txtan argument passed to the command

tail flags & options

-nprint the last N lines
-cprint the last N bytes
-ffollow — keep printing new lines as the file grows
-Ffollow by name, retrying if the file is rotated

Other commands

Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.