Reset file length to zero bytes.
Section: Create, touch, truncate
Empty a file without deleting it
bash
bash
truncate -s 0 app.logLearn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Create, touch, truncate