X
X

Select Your Currency

Türk Lirası $ US Dollar
X
X

Select Your Currency

Türk Lirası $ US Dollar
Yıllık Satın Alımlarda %15 İndirim: Şimdi Tasarruf Edin! Detaylı Bilgi İçin Tıklayın!

Knowledge Base

HomepageKnowledge BaseControl PanelsHow to Clear cPanel Automatic TMP

How to Clear cPanel Automatic TMP

When the TMP directory is full, many sites, especially the MySQL service, experience problems and access problems. We will create cron to solve this problem.

First, we create the file that we will run in cron.

nano /usr/bin/tmpsil


The file content will appear blank. Into the file:

#/usr/bin/!
cd /tmp
find . -type f -print -exec rm {} \;
service mysql reload
After pasting the lines, we exit the file and save it with the ctrl + x command.

Then, we provide permissions to our file on the shell command client.

chmod +x /usr/bin/tmpsil
Now you can make the necessary settings to delete tmp whenever you want. Additionally, when we want to delete it manually, you can delete it by using the tmpsil command on the shell command client.

After entering the crontab adding page using the crontab -e command, you can edit and add the crontab below as you wish.

0 2 * * * /usr/bin/tmpsil > /dev/null 2>&1
Thanks to this crontab, the tmp area of ​​the server will be cleaned every day at 2 am.

You can click for our Türkiye location physical servers.

Can't find the information you're looking for?

You have examined the knowledge base in detail, but if you cannot find the information you need,

Create a Support Ticket
Did you find it useful?
(281 times viewed. / 0 people found helpful.)