Thamizhiniyan C S
HomeWriteupsResourcesCheatsheets
HackerRank
HackerRank
  • HackerRank
  • Linux Shell
    • Bash
    • Text Processing
      • Cut
      • Head
      • Middle
      • Tail
      • Tr
      • Sort
      • Uniq
      • Paste
    • Arrays In Bash
    • Grep Sed Awk
      • Grep
      • Sed
      • Awk
  • Regex
    • Introduction
    • Character Class
    • Repetitions
    • Grouping and Capturing
    • Backreferences
    • Assertions
    • Applications
  • Python
    • Introduction
    • Basic Data Types
    • Strings
    • Sets
    • Math
    • Itertools
    • Collections
    • Date and Time
    • Errors and Exceptions
    • Classes
    • Built-Ins
    • Python Functionals
    • Regex and Parsing
    • XML
    • Closures and Decorators
    • Numpy
    • Debugging
  • C
    • Introduction
    • Conditionals and Loops
    • Arrays and Strings
Powered by GitBook
On this page
  • Tail of a Text File #1
  • Tail of a Text File #2

Was this helpful?

  1. Linux Shell
  2. Text Processing

Tail

Tail of a Text File #1

In this challenge, we practice using the tail command to display the last n lines of a text file.

Display the last 20 lines of an input file.

tail -n 20

Tail of a Text File #2

In this challenge, we practice using the tail command to display the last 20 characters of a text file.

Display the last 20 characters of an input file.

tail -c 20
PreviousMiddleNextTr

Last updated 1 year ago

Was this helpful?