Hello,
Today I check few of my websites folder under my web server I found that most of the folders contains the file "error_log" at some folders it is in smaller size but in others its around 600-900 MB in size per file. My question is
1. Whether its wise to stop creation of that file by Apache? If yes then how to stop it?
2. Second question is can we stop it for only few websites?
3. And is that safe to delete error_log file? If yes how to search that file in SSH and how to delete it using one command as it would be really hard to delete one by one from each folder.
EDIT about question 3:
I found this command:
But the command below dont work:
Please help me with this. Thank you!
-Regards.
Today I check few of my websites folder under my web server I found that most of the folders contains the file "error_log" at some folders it is in smaller size but in others its around 600-900 MB in size per file. My question is
1. Whether its wise to stop creation of that file by Apache? If yes then how to stop it?
2. Second question is can we stop it for only few websites?
3. And is that safe to delete error_log file? If yes how to search that file in SSH and how to delete it using one command as it would be really hard to delete one by one from each folder.
EDIT about question 3:
I found this command:
Code:
cd /home
find . -name error_log
find . -name error_log -exe rm -f {} \;
find . -name error_log
the above commands will first find all files and list them, the next one will find all files and remove them, the last will confirm that all the error log files have been deleted.
But the command below dont work:
Code:
find . -name error_log -exe rm -f {} \;
root@server [/home/url]# find . -name error_log -exe rm -f {} \;
find: invalid predicate `-exe'
root@server [/home/url]#
Please help me with this. Thank you!
-Regards.
Last edited: