How to truncate log file If you want to empty (truncate to 0 size) some file then it is quite simple command: > my_logfile.log where my_logfile.log is your file name.