|
Search:
Advanced search
|
Browse by category:
|
Contact Us |
Clean /tmp from old session files |
|||||
You may have noticed that you /tmp directory fills up with obsolete old session file from the web server. These files fill up your /tmp and besides the fact that most of the times there is not any disk space issues, a large number of files makes it almost impossible to notice strange files lying in your tmp directory. In order to clean this sessions files that are older than "Today" you can execute the following script (copy and paste it to a file on your server).
#!/bin/sh # # Clean session files from /tmp older than "Today" # echo "Clean /tmp from junk files" TODAY=`date | awk '{print $2, $3}'` cd /tmp echo "-> Clear old Apache session files from /tmp" for file in `ls -l sess_* | grep -v "$TODAY" | awk '{print $9}'` do rm -f $file done echo "All done :-)" |
|||||
| Also read | |
| Mail Mass Delete | |
| Others in this Category | |
| Roundcube on CPanel 11 (x3 theme) | |
| Proxy RoundCube Webmail on HTTP Port 80 | |
| MySQL Usage Limit | |
| Exim Ignore MX Record | |
| Upgrade ClamAV to latest version | |
Powered by
KBPublisher (Knowledge base software)