Showing posts with label cleaning. Show all posts
Showing posts with label cleaning. Show all posts

Thursday, May 05, 2011

Tuesday, April 26, 2011

clean up disk space

today i delete previous kernel files. this freed up about 200MB :)

[root@local html]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hdb6 8.6G 7.9G 250M 97% /

i'm using this reference:

Thursday, April 14, 2011

clear logs

refer to this page


cat /dev/null > /var/log/messages
cat /dev/null > /var/log/wtmp
cat /dev/null > /var/log/maillog

etc..

this will delete the contents of the file without removing the file itself or changing any of it's permissions. Repeat as necessary for each log file, write into a bash script whatever.. then delete all the numbered log files ( i.e. messages.1.tar.gz ) which are old logs that have been backed up from logrotate or a similar app.

from farslayer

some error logs with location

cat /dev/null > /var/log/messages
cat /dev/null > /var/log/openwebmail.log
cat /dev/null > /var/log/maillog
cat /dev/null > /var/log/secure
cat /dev/null > /var/log/httpd/error_log
cat /dev/null > /var/log/httpd/ssl_error_log
cat /dev/null > /var/log/httpd/ssl_request_log
cat /dev/null > /var/log/httpd/ssl_access_log
Related Posts Plugin for WordPress, Blogger...