You Asked: How Do I Clear Log Data in Linux?
Contents

How do you clear a log file?

Delete Saved Console.log

  1. Launch Event Viewer → File (in the menu) → Options (here you’ll see the disk space in your file and how much space your saved files have consumed in your profile).
  2. Hit Disk Cleanup and then Delete Files.
  3. Now Exit and hit OK.

How do you clear the log file in Unix?

Is there a proper way to clear log files on Unix? You can simply truncate a log file using > filename syntax. For example if log file name is /var/log/foo, try > /var/log/foo as root user.

Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest