Hacker News new | ask | show | jobs
by markandrewj 812 days ago
Depending on the environment you can also use the truncate command. This will work if the file is open as well.

https://man7.org/linux/man-pages/man1/truncate.1.html