4 Comments

  1. Couple of remarks here:
    – tail defaults to showing the last 10 lines
    – tail -n 5, tail -n -5 and tail -5 all do the same: they show the last five lines of the file
    – tail -n +5 and tail +5 all do the same: they show all the lines from the fifth (included) till the end of the file
    – tail always shows the end of the file starting from a certain definable line/block/byte

    I think you got some stuff a little mixed up, especially regarding positive line numbers (you have to explicitely say +5 to start at the fifth line, as opposed to 5 or -5 starting at the fifth line before end), the fact that tails always ouputs the end of the file. To get the first lines of a file, go with the well-named head 🙂

Comments are closed.