How to clear mail log on FreeBSD

To clear log, there is several ways that can be done.
1st : 
/var/log/mail.log
Below is the command where we will use cat to overwrite log with null value.
cat /dev/null > /path/to/logfile
How to clear all log in one directory.
This command will overwrite all log in the directory of /var/log with null value
for i in /var/log/*; do cat /dev/null > $i; done
If you have any problem, can ask in the comment section below.

Comments