×
English Section!
We will be more than happy to help you with problems related to our services and products. Please feel free to write it down as clear as possible
We will be more than happy to help you with problems related to our services and products. Please feel free to write it down as clear as possible
How to clean all log files in CWP7
- infogate
- Συντάκτης θέματος
- Αποσυνδεμένος
- Administrator
- Imagination is the beginning of creation
2 Χρόνια 11 Μήνες πριν - 3 Μήνες 1 Ημέρα πριν #209
από infogate
The best possible way to start your online marketing : fspirits.com/go/leadsleap-home
Explode Your Web Site Traffice: fspirits.com/go/sparktraffic
Start your affiliate journey here: fspirits.com/go/olsp-academy
Best Solution To Create Videos: fspirits.com/go/create-studio-pro
Best Solution To Create Graphics: fspirits.com/go/clickdesigns
Smart Chat Automation: fspirits.com/go/chatterpal
Multi-Purpose Video Maker: fspirits.com/go/avatar-builder
Multi-Purpose Video Creator: fspirits.com/go/video-creator
AI Human Spokesperson Videos: fspirits.com/go/humanpal
How to clean all log files in CWP7 δημιουργήθηκε από infogate
First create a file in /root dir :
Then paste this Bash script and save it:
Change the permission :
Now run this command to run the clear log script:
Thats it the logs will be cleared you can go and check to the respected locations of the log.
Cron Job :
You can also create cron job like below by following solution 2 and create this cron job task according to your needs :
TO run DAILY :
TO run Weekly :
TO run Monthly:crontab -e
Press insert and then
Add the command at the end of the file. You can simply paste the line: Save and exit the editor:
cd /root
nano clearlog.sh
Then paste this Bash script and save it:
#!/bin/bash
truncate -s 0 /usr/local/apache/logs/*bytes
truncate -s 0 /usr/local/apache/logs/*log
truncate -s 0 /usr/local/apache/domlogs/*bytes
truncate -s 0 /usr/local/apache/domlogs/*log
truncate -s 0 /var/log/messages
truncate -s 0 /var/log/maillog
truncate -s 0 /var/log/*log
truncate -s 0 /usr/local/cwpsrv/logs/access_log
truncate -s 0 /usr/local/cwpsrv/logs/error_log
truncate -s 0 /var/log/cron
truncate -s 0 /var/log/secure
truncate -s 0 /var/log/cwp/services_action.log
truncate -s 0 /var/log/cwp/cwp_sslmod.log
truncate -s 0 /var/log/cwp/cwp_cron.log
truncate -s 0 /var/log/cwp/cwp_backup.log
truncate -s 0 /var/log/cwp/activity.log
truncate -s 0 /usr/local/cwpsrv/var/services/roundcube/logs/errors
rm -rf /var/log/maillog-*
rm -rf /var/log/monit.log-*
rm -rf /var/log/spooler-*
rm -rf /var/log/messages-*
rm -rf /var/log/secure-*
rm -rf /var/log/pureftpd.log-*
rm -rf /var/log/yum.log-*
rm -rf /var/log/monit.log-*
rm -rf /var/log/cron-*
rm -rf /var/lib/clamav/tmp.*
Change the permission :
chmod 755 /root/clearlog.sh
Now run this command to run the clear log script:
sh /root/clearlog.sh
Thats it the logs will be cleared you can go and check to the respected locations of the log.
Cron Job :
You can also create cron job like below by following solution 2 and create this cron job task according to your needs :
TO run DAILY :
0 0 * * * /usr/bin/sh /root/clearlog.sh
TO run Weekly :
0 0 * * 0 /usr/bin/sh /root/clearlog.sh
TO run Monthly:
0 0 1 * * /usr/bin/sh /root/clearlog.sh
If you want to use it running shell do the following
Press insert and then
Add the command at the end of the file. You can simply paste the line:
0 0 1 * * /usr/bin/sh /root/clearlog.sh
- If you're using nano, press Ctrl + O, then Enter to save, and Ctrl + X to exit.
- If you're using vim, press Esc, then type :wq and hit Enter.
The best possible way to start your online marketing : fspirits.com/go/leadsleap-home
Explode Your Web Site Traffice: fspirits.com/go/sparktraffic
Start your affiliate journey here: fspirits.com/go/olsp-academy
Best Solution To Create Videos: fspirits.com/go/create-studio-pro
Best Solution To Create Graphics: fspirits.com/go/clickdesigns
Smart Chat Automation: fspirits.com/go/chatterpal
Multi-Purpose Video Maker: fspirits.com/go/avatar-builder
Multi-Purpose Video Creator: fspirits.com/go/video-creator
AI Human Spokesperson Videos: fspirits.com/go/humanpal
Last edit: 3 Μήνες 1 Ημέρα πριν by infogate.
Παρακαλούμε Σύνδεση ή Δημιουργία λογαριασμού για να συμμετάσχετε στη συζήτηση.
Χρόνος δημιουργίας σελίδας: 0.034 δευτερόλεπτα