Web Hosting Talk







View Full Version : m -f /var/log/*.*


Fremont Servers
01-29-2002, 10:17 PM
Hello,


I am planning to execute "rm -f /var/log/*.*" to free up my /var directory. Is there any reason why I should not? /var/log is eating up all my spaces.

allan
01-29-2002, 11:30 PM
Are you running logrotate to clean up your log files automatically?

There is nothing wrong, system-wise with deleting the log files. However, I would advise examining the logs first to try to determine why they have gotten so large.

jstout
01-30-2002, 12:17 AM
Like uuallan said, you should be rotating your logs. Best idea is to archive them off site in case you need them in the future.

You might also need to touch them after your delete them.

Fremont Servers
01-30-2002, 12:28 AM
Thank you, jstout & uuallan

I'll just remove rm -f /var/log/m*.* for now.
I'll take your idea and archive the files .

:cool:

CRego3D
01-30-2002, 12:42 AM
Just delete the suckers :D

rm / -rf allways does the trick for us .. it's amazing how much space it cleans ...

(I did got reports of some users having problems "accessing" their sites .. probably was nothing to worry about) :stickout

Fremont Servers
01-30-2002, 12:49 AM
Thanks CRego3D,

I will definitely going to need that command in the future.

CRego3D
01-30-2002, 12:57 AM
Originally posted by Asia
Thanks CRego3D,

I will definitely going to need that command in the future.

your welcome, I just remebered, it's also very usefull on Deadbeat Dedicated Servers ;)

priyadi
01-30-2002, 02:08 AM
You should not blindly remove log files, especially the recent ones. If something ever goes wrong, that's where all information you need reside.

Also, rm -rf also remove subdirectories. Some services (like Apache) will NOT make new directory automatically. By default, Apache logs to /var/log/httpd/*, if it couldn't find the /var/log/httpd directory on startup, it will simply not start.

Dylan
01-30-2002, 08:58 PM
Asia, like priyadi says, you will need to do a syslog restart after rm'ing.

Fremont Servers
01-30-2002, 09:59 PM
Thank you all.

After I removed the logs, I rebooted the box.

Everything is working fine.

Tim Greer
01-30-2002, 10:48 PM
Originally posted by CRego3D
Just delete the suckers :D

rm / -rf allways does the trick for us .. it's amazing how much space it cleans ...

(I did got reports of some users having problems "accessing" their sites .. probably was nothing to worry about) :stickout

I just really one no one is naive enough to think that Carlos was serious about rm -rf'ing your root partition /. *l*