Output everything but the last few lines of a file

head

head --lines -{{count}} {{path/to/file}}

click the source code to copy install head on any operating system with command-not-found.com