Arvy

Well-Known Member
Oct 3, 2006
139
10
168
Brazil
cPanel Access Level
Root Administrator
Twitter
Hello all,

maybe this is a stupid question, but I prefer to ask to avoid problems :)

When I:
[email protected] [/usr/local/apache/logs]# ls -lia

I see some HUGE files, default Apache logging, I know.

7832723 -rw-r--r-- 1 root root 103588911 Jan 6 02:10 access_log
7832721 -rw-r--r-- 1 root root 246034763 Jan 6 02:10 error_log
7834413 -rw-r--r-- 1 root root 305358439 Jan 6 02:11 suexec_log

Question: can I stop Apache, delete the files (to save 600 Mb) and restart?
Just a "rm"? Or I need to "echo > file" to let them with zero bytes?

Thank you!
Arvy
 

nyjimbo

Well-Known Member
Jan 25, 2003
1,133
1
168
New York
Hello all,

maybe this is a stupid question, but I prefer to ask to avoid problems :)

When I:
[email protected] [/usr/local/apache/logs]# ls -lia

I see some HUGE files, default Apache logging, I know.

7832723 -rw-r--r-- 1 root root 103588911 Jan 6 02:10 access_log
7832721 -rw-r--r-- 1 root root 246034763 Jan 6 02:10 error_log
7834413 -rw-r--r-- 1 root root 305358439 Jan 6 02:11 suexec_log

Question: can I stop Apache, delete the files (to save 600 Mb) and restart?
Just a "rm"? Or I need to "echo > file" to let them with zero bytes?

Thank you!
Arvy
Just delete them AND THEN restart apache/httpd and they will start over empty. I do it all the time.