Monthly Archives: June 2017

How to strip a certain number of Bytes from the end of a file in bash

To crop the last n Bytes from a file you can use the truncate command. [u_r_the_man@TESTBOX ~]$ truncate –size=-n <filename>Where n represents the number of Bytes to cut from the end of <filename>. The advantage is that the command will … Continue reading

Posted in Bash, Beginner, Linux | Leave a comment