First part
- Open terminal
- Type
head -n {n} {file}
{n} is the number of lines to return
{file} name of the file
Last part
- Open terminal
- Type
tail -n {n} {file}
{n} is the number of lines to return
{file} name of the file
Example
Print the first 10 lines of the blogger.log file
head -n 10 blogger.log