Opening Large Files in UNIX

I need to view part of a large file (over 100 MBs) and was wondering if there's anyway that I can just view the first 50 lines or so at the very top or very bottom of the file. If so, can somebody let me know what command to use?

Also, if I need to edit the file, is there anyway to do this by only editing the first or last few lines of the file? If I try to open the entire thing, it takes forever and never ends up letting me edit the file.

 

 

 

 

Top