Q. How do I delete a log file in Linux without distributing running application? My log file size is quite huge.
A. You can simply truncate a log file using > filename syntax. For example if log file name is /var/log/message, use:
If you really wanted to delete or remove a file type:
# rm /var/log/message
A better approach is to use logrotate tool. It is designed to ease administration of systems that generate large numbers of log files. It allows automatic rotation, compression, removal, and mailing of log files. Each log file may be handled daily, weekly, monthly, or when it grows too large.
See previous logrotate faq article