February 20, 201412 yr Many Linux distributions are preconfigured to automatically and periodically rotate syslog log files by means of cron jobs that call logrotate or a similar log rotation script. However, if you want to clear a log file manually, you can simply use the greater than sign followed by the log file name. For example, to manually clear the file kern.log, you can run this command: dennis@hosangit:> /var/log/kern.log The cleared out file still retains its original permissions and ownership.
Create an account or sign in to comment