Best Answer: How Do I Delete a Log File in Linux?
Contents How Do I Delete a Log File in Linux Without Disturbing Running Application? Is There a Proper Way to Clear Log Files on Unix? You Can Simply Truncate...
Contents
How do I delete a log file in Linux without disturbing running application? 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.
How do you clear a log file in Linux?
How to clean log files in Linux
- Check the disk space from the command line. Use the du command to see which files and directories consume the most space inside of the /var/log directory. …
- Select the files or directories that you want to clear: …
- Empty the files.
Must Read
How do I delete a log file in Unix?
How to clean log files in Linux
- Check the disk space from the command line. Use the du command to see which files and directories consume the most space inside of the /var/log directory. …
- Select the files or directories that you want to clear: …
- Empty the files.