Trim a text file to desired length
How would I write a function that trims a text file approximately to desired size in bytes? The file is a newline-separated list and I would like to trim it between the elements, not inside them.
Trim a text file to desired length
===

How would I write a function that trims a text file approximately to desired size in bytes? The file is a newline-separated list and I would like to trim it between the elements, not inside them.