Output everything but the last few bytes of a file

head

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

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