Here also in case of Hadoop, it is very similar to Unix, you can use the head parameter here as well as given below.
hadoop fs -cat /your/file | head
To get the tail there is another command in hadoop:
hadoop fs -tail /your/file
But, it returns last kilobyte of the data, not given number of lines.
Hope this will help!