How to clear log files

Firstly, do not delete log files. It can cause mistakes and problems in your programs or OS.

To clear log files, you can simply use echo command with the following syntax:

echo "" > logfile

Alternative method is:

:> logfile

Powered by BetterDocs