catch grep cat last first lines of a file tail --lines=100 file.dat #wll grep last 100 lines head --lines=100 file.dat #will grep cat first 100 lines