truncate - shrink or extend the size of a file
truncate -s SIZE file...
Options you will use
-s SIZE- Set the size. 0 empties the file in place - which, unlike rm, frees the space of a file another process still has open.
Taught in
Try truncate in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.