Step 1/1: Change a file’s size

truncate -s 0 FILE empties a file while keeping it (and the programs writing to it) in place; -s 10M sets a size, -s +1K grows it.

$ truncate -s 0 app.log
Fundamentalstruncate
Empty a log, keep the file
Use truncate to cut logs/worker.log down to 0 bytes (keep the file itself: a program is still writing to it).