Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Free System Space from Massive Logs
- 1. Remove compressed log files from /var/log
- ```bash
- $ sudo find /var/log -type f -name "*.gz" -delete
- ```
- 2. Truncate Log files
- ```bash
- $ cd /var/log
- $ sudo truncate -s 0 mail.log
- $ sudo truncate -s 0 mail.log.1
- $ sudo truncate -s 0 syslog
- $ sudo truncate -s 0 syslog.1
- ```
- 3. Truncate Nginx error/access logs
- ```bash
- $ cd to_nginx_log_dir
- $ sudo truncate -s 0 error.log access.log
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement