|
Here is a test file : $ cat test 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 $ Now. 'head' command can be used to print top five lines as follows: $ head -5 test 1 2 3 4 5 $
Lets say our while reading output of a log file, our requirement is to print all lines except last five lines , then also 'head' command can help as follows: $ head -n -5 test 1 2 3 4 5 6 7 8 9 10 11 $
|