Results 1 to 7 of 7
  1. #1

    How to clear /tmp files?

    How do I clear/Delete /tmp files?


    I guess there is no GUI for this?
    All command lines?

    If so, how do I proceed? What comands do I type =S


  2. #2
    Join Date
    Apr 2009
    This will delete all the files and dirs in /tmp
    Keep in mind that this files will be deleted for good.
    rm -rf /tmp/*

    If you need a gui, try this:
    For CentOS:
    yum install mc

    This will install and start mc, a gui in text mode, with insert you can select multiple files/dirs, with F8 you delete them.

    Don't delete any critical file/dir from your linux server.

    All this apply if you have a linux server, next time post more details. - Managed dedicated servers, cloud servers and software development.

  3. #3

    Easiest Way

    In /etc/fstab, mount instructions like
    tmpfs /tmp tmpfs rw,nosuid,noexec,noatime,size=40M,nr_inodes=8k 0 0

    Reboot. Now /tmp is cleared after every reboot. Nothing ever goes to disk, and you can still use rm as others suggest. In fact, now when you do a rm, it's nearly instantaenous because there is no disk activity involved.

  4. #4
    If you are not great with console commands you could try installing webmin.

    It provides a good java file manager and its free..

  5. #5
    Join Date
    Apr 2007
    United Kingdom
    tmpwatch 24 /tmp

    I wouldn't rm -rf your tmp directory...
    EZPZ Hosting - Dependable and Affordable Web Hosting
    LiteSpeed SSD Powered cPanel Shared & Reseller Hosting | Budget VPS, Managed VPS and Dedicated
    Reseller Hosting Specialists | WHMCS-Based End User Support | Unlimited SSLs | UK and USA
    99.9% Uptime Guarantee | 24/7 Support | 30 Day Money Back Guarantee

  6. #6
    Join Date
    May 2008
    If you are deleting the files in /tmp using the command rm -rf /tmp/*, make sure that you put a link for the mysql sockfile.

    ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock

    If the mysql socket file is specified to your /tmp directory, then you will have trouble connecting to the mysql server if the file is missing.

  7. #7
    If you are using the CentOS you can set a cronjob /etc/cron.daily/tmpwatch to clean the files which have'nt been access for a period of time from /tmp.
    Support Facility | 24/7 web hosting technical support services
    Technical support | Server management | Data migration

    Technical Articles

Similar Threads

    By mininimbus in forum Domain Name Offers
    Replies: 3
    Last Post: 03-19-2008, 05:20 PM
  2. Clear Out
    By Bonzer in forum Other Offers & Requests
    Replies: 0
    Last Post: 02-07-2007, 03:43 PM
  3. It's time to clear, clear, clear - get 50% OFF!!!
    By Servstra-Sales in forum Dedicated Hosting Offers
    Replies: 9
    Last Post: 12-18-2005, 09:33 PM
  4. please clear this
    By jaik in forum Domain Names
    Replies: 1
    Last Post: 06-01-2004, 06:03 AM
  5. Replies: 5
    Last Post: 11-18-2003, 02:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts