To view the first lines of a text file, use the head command.
head file.txt = show first 10 lines of file
head -25 file.txt = show first 25 lines of file
To view the last lines of a text file, use the tail command.
tail file.txt = show last 10 lines of file
tail -25 file.txt = show last 25 lines of file