head ~/.profile
n lines, the -n option can be used: head -n 20 ~/.profile
sed can be used. $ sed -n /path/to/file -e 15,20p
$ seq 1 100 | sed -n -e '42p;99p'
head is to show a directory's largest n files. get-content -first n and get-content -last n.