Your Question: How Do I Delete Old Log Files in Unix?
Contents 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...
Contents
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 I delete old log files 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
Can I delete old log files?
If you would rather clear the log files manually, you can delete unwanted files with a Run command in the Command Prompt. … You can then enter the command “del *. log /a /s /q /f” and press “Enter” to delete all log files from the Windows directory.