1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Funny but I can not remove folder

Discussion in 'Site & Server Administration' started by deriklogov, Jun 30, 2009.

  1. #1
    Hey everybody,

    very funny but I can not remove folder in Unix under root.
    problem is I run a php script which created folder with backsplash like
    worldwide\r , and when I am trying to remove with rm worldwide\r it just says that folder can not be found. NEED YOUR HELP.
     
    deriklogov, Jun 30, 2009 IP
  2. RHS-Chris

    RHS-Chris Well-Known Member

    Messages:
    1,007
    Likes Received:
    35
    Best Answers:
    10
    Trophy Points:
    150
    #2
    Not tried this, but what about enclosing it with quotes:

    rm 'worldwide\r'
     
    RHS-Chris, Jun 30, 2009 IP
  3. deriklogov

    deriklogov Well-Known Member

    Messages:
    1,077
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    130
    #3
    I tried that, doesnt help
     
    deriklogov, Jul 1, 2009 IP
  4. maestria

    maestria Well-Known Member

    Messages:
    705
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #4
    Have you tried rm worldwide*
    or still you can go ahead and run the same php script with unlink command in that.
     
    maestria, Jul 1, 2009 IP
  5. sahabcse

    sahabcse Well-Known Member

    Messages:
    272
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    140
    #5
    find \ - name foldername

    its provide the folder path


    then try

    rm -rf foldername
     
    sahabcse, Jul 1, 2009 IP
  6. tuxicy

    tuxicy Member

    Messages:
    79
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #6
    another idea, connect to your server vis ssh which comes with most of the linux distributions, which you can ssh with window managers like konqueror or nautilus. Then right click and delete.
     
    tuxicy, Jul 1, 2009 IP
  7. deriklogov

    deriklogov Well-Known Member

    Messages:
    1,077
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    130
    #7
    Hey sahabcse
    rm -rf worldwide* works, but I have another category named \r
    I am afraid to run rm -rf * could delete everything , any other Ideas ?

    to tuxicy: I dont think I have any of those installed on my sys
     
    deriklogov, Jul 1, 2009 IP
  8. tuxicy

    tuxicy Member

    Messages:
    79
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #8
    You dont have to install anything.
    Just download a small linux distro like Slax (150 mb or smt), burn to cd as an image file, restart your machine. Use it live, then restart again to your old windows...
     
    tuxicy, Jul 2, 2009 IP
  9. deriklogov

    deriklogov Well-Known Member

    Messages:
    1,077
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    130
    #9
    Hey tuxicy,

    thank you for your help, but its not local machine, its dedicated server, so every move is very hard and there is no old windows
     
    deriklogov, Jul 2, 2009 IP
  10. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #10
    If you have ssh access

    Change the user info of the directory

    chown
    chkgrp

    use those commands and change it to root
     
    Bohra, Jul 2, 2009 IP
  11. tuxicy

    tuxicy Member

    Messages:
    79
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #11
    Holy ....
    Sorry, I just thought I am in a linux board...:eek:
     
    tuxicy, Jul 3, 2009 IP
  12. gary4gar

    gary4gar Peon

    Messages:
    496
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Use double quotes.I tried this now my machine now. it works for me
    
    # mkdir "\r"
    
    #ls | grep r
    Maildir
    \r
    scripts
    src
    
    
    #file "\r"
    \r: directory
    
    #rm rf "\r"
    
    Code (markup):
     
    gary4gar, Jul 4, 2009 IP
  13. vasyl

    vasyl Peon

    Messages:
    138
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #13
    get in by ssh, then type rm -Rf worldwide <Tab> <Enter>
     
    vasyl, Jul 4, 2009 IP
  14. Mr.Comedy

    Mr.Comedy Banned

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    rm should do the trick
     
    Mr.Comedy, Jul 5, 2009 IP
  15. pitagora

    pitagora Peon

    Messages:
    247
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #15
    press TAB in the console to get auto completion. Generally that character needs to be escaped. Unfortunately i'm more of a windows kind of guy and don't know exactly how the escaped file name is, but auto complete will always get it right.

    Either that or install midnight commander and delete from there. I recommend this one since it will make editing files a lot easier.
     
    pitagora, Jul 8, 2009 IP