/* Display last 10 (default) lines of a file */
$ tail num.txt/* Display first 10 (default) lines of a file */
91
92
93
94
95
96
97
98
99
100
$ head num.txt
1
2
3
4
5
6
7
8
9
10
-n display n lines (for both head & tail) +n display starting from line# n (only for tail)/* Display last 5 lines of a file */
$ tail -5 num.txt
96
97
98
99
100
/* Display first 5 lines of a file */ $ head -5 num.txt
1
2
3
4
5
/* Display from line# 91 of the file (to the end) */ $ tail +91 num.txt
91
92
93
94
95
96
97
98
99
100
/* Display 5 lines from line# 91 */ $ tail +91 num.txt | head -5
91
92
93
94
95