Damn spell checker Concatenate the files cat textfile compressedfile > newfile Or cat textfile compressedfile textfile > newfile But I don't think you'll be able to uncompress the new file afterwards. You will then need to find a way to remove the lines to uncompress the original file