Results 1 to 10 of 10

Thread: /tmp dir

  1. #1
    Join Date
    Jul 2010
    Location
    Close 2 U
    Posts
    549

    * /tmp dir

    rm -rf /tmp

    fail as its contain a lot of files ...
    advise ..

    Not as that Much Expert
    I'm just a "LostEagle"
    _-_-_-_-_-_-_-_-_-_-_-_-_

  2. #2
    Do this way.
    Code:
    rm -vf /tmp/sess_[a-d]* ; rm -vf /tmp/sess_[a-o]* ; rm -vf /tmp/sess_[a-z]* ; rm -vf /tmp/sess_[0-4]* ; rm -vf /tmp/sess_[0-9]* ; rm -vf /tmp/sess_* ; rm -vf /tmp/cache_* ; rm -vf /tmp/*.dat
    This is for my /tmp contents.
    Hope you got the logic now.

  3. #3
    why would you wanna remove the tmp directory ? it is imperative that the tmp dir is there, as system cannot work properly without it. not to mention that the default mysql/postgres sockets are in tmp, apache writes there the session files. removing /tmp would cause you just trouble. so once again why would you want to remove it lol ?
    XSBackup - keeping your data secure. Offsite redundant backups - RAID6 storage / rSync / SSH / FTP access. Whitelabel services / Reseller accounts available.
    NEW! - If you need awesome admins to secure, optimize and maintain your servers, you're in the right place.

  4. #4
    Join Date
    Jul 2010
    Location
    Close 2 U
    Posts
    549
    it contain a lot of suspicious files ...

    Not as that Much Expert
    I'm just a "LostEagle"
    _-_-_-_-_-_-_-_-_-_-_-_-_

  5. #5
    Join Date
    Oct 2002
    Location
    State of Disbelief
    Posts
    22,951
    What do you find is suspicious about them?
    Having problems, or maybe questions about WHT? Head over to the help desk!

  6. #6
    Join Date
    Jul 2010
    Location
    Close 2 U
    Posts
    549
    It contain a lot of file ... Calm + LFD noted about 400 suspicious files ...

    So I planed to clear the dir ...

    Not as that Much Expert
    I'm just a "LostEagle"
    _-_-_-_-_-_-_-_-_-_-_-_-_

  7. #7
    Join Date
    Jan 2003
    Location
    U.S.A.
    Posts
    3,911
    Run the following command.

    cd /tmp
    rm -rf *

  8. #8
    Join Date
    Jul 2010
    Location
    Close 2 U
    Posts
    549
    As I post ...
    This fail while the dir has too many files ... the server fail is listing them

    Not as that Much Expert
    I'm just a "LostEagle"
    _-_-_-_-_-_-_-_-_-_-_-_-_

  9. #9
    Join Date
    Mar 2010
    Location
    India
    Posts
    224
    Hello,

    You can done this by using the following commands;

    cd /tmp
    ls -A | xargs rm -fr

    Please note that the second command will remove all the files from the standing folder, so make sure you are executing the second command in the tmp folder.

    note: It will delete all files from the /tmp folder

    Or you can delete the files with common string using the following commands;

    ls | grep 'STRING' | xargs rm -fr
    Techs4GNU :: Remote Tech Support & Server Management
    Per server support and Shared Team Specialists
    support[at]nixtree.com
    Cpanel Per Server Management Plan

  10. #10
    Join Date
    Jul 2010
    Location
    Close 2 U
    Posts
    549
    THANKS GUYS

    Not as that Much Expert
    I'm just a "LostEagle"
    _-_-_-_-_-_-_-_-_-_-_-_-_

Similar Threads

  1. Calc all users tmp dir
    By oozypal in forum Dedicated Server
    Replies: 2
    Last Post: 11-11-2010, 04:50 PM
  2. Tmp dir problems
    By Daemon1 in forum Hosting Security and Technology
    Replies: 10
    Last Post: 11-12-2005, 09:07 AM
  3. Problem with spammer getting into the tmp dir
    By recko11 in forum Hosting Security and Technology
    Replies: 21
    Last Post: 10-21-2005, 07:16 AM
  4. keep tmp dir clean
    By dreaz in forum Hosting Security and Technology
    Replies: 2
    Last Post: 08-28-2005, 05:00 PM
  5. dir /tmp
    By -Edward- in forum Dedicated Server
    Replies: 8
    Last Post: 07-17-2002, 07:47 AM

Posting Permissions

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