File won't be deleted....

Discussion in 'macOS' started by abez, Mar 5, 2011.

  1. abez macrumors newbie

    Joined:
    Mar 5, 2011
    #1
    I have a file on my hard drive called

    38623 38623 38623 38623 뿿찤뿿23@__ቐ츀ı觀ᤥ⻐᥀23ÿ38623-38623 _ꯠᕝ뙈뿿__똀뿿믜뿿______ワĀ__뉔뿿⻐᥀㠳㈶ⴳ㠳⻐᥀__⹠᥀밸뿿梆_츀ı
    Zero Kb
    Alias

    It won't be deleted, if i try to put it in the trash it gives me (Error code -35)

    Please Help
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    Try deleting it from the command line. Open Terminal and enter rm then [space], then from Finder, drag the file into Terminal. Hit [enter].
     
  3. abez thread starter macrumors newbie

    Joined:
    Mar 5, 2011
    #3
    Didn't Work

    The file can't only not be deleted but also not moved, so dragging it into the terminal doesn't work....
     
  4. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #4
    Dragging it to Terminal isn't attempting to move it, it simply pastes the file path into Terminal. The file in untouched in this operation.
     
  5. RaceTripper macrumors 68030

    Joined:
    May 29, 2007
    #5
    You need to use the sudo command with rm. That will give you admin privileges for deleting the file.

    sudo rm

    Put a space after rm. Drag and drop the file into Terminal, bring Terminal into focus by clicking on it and hit return. The Terminal will prompt you for your password. Enter it and the file should be deleted.
     
  6. brijazz macrumors 6502

    brijazz

    Joined:
    Jul 31, 2008
    #6
    RM can be used without sudo, and even runs from non-administrator accounts.
     
  7. abez thread starter macrumors newbie

    Joined:
    Mar 5, 2011
    #7
    No...

    That doesn't work because wat i meant by move also meant paste or modify in any way, any other suggestions?
     
  8. RaceTripper, Mar 5, 2011
    Last edited: Mar 5, 2011

    RaceTripper macrumors 68030

    Joined:
    May 29, 2007
    #8
    Yes, that's right, unless you don't have rights to the file you are trying to remove. That's why I suggested running rm with sudo.

    FYI: there is no RM command. Unix is case sensitive.


    That doesn't make sense, because drag and drop into Terminal does nothing but paste the file's path into the command prompt. It doesn't manipulate the file itself in any way. Something else is hinky here, or you aren't doing the drag and drop correctly somehow.
     
  9. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #9
    Dragging the file doesn't paste or modify the file. Can you drag the file at all? If you can't, reboot your machine and try again.
     
  10. brijazz macrumors 6502

    brijazz

    Joined:
    Jul 31, 2008
    #10
    Have you tried executing the Terminal command yet? By dragging it into a Terminal window, you're not pasting/modifying the file, you're just telling Terminal to run the rm command on that file.
     
  11. brijazz macrumors 6502

    brijazz

    Joined:
    Jul 31, 2008
    #11
    Entering the command in upper-case letters in the Terminal works just fine (although you can't pull up a man page on "RM", just on "rm", so I guess you're at least halfway right). I usually do enter the command in lower-case anyhow, but I guess the system is smart enough to resolve the command even if it's entered in upper-case.
     
  12. RaceTripper macrumors 68030

    Joined:
    May 29, 2007
    #12
    That's just Mac OS X is just playing babysitter by translating it to the correct command. Anyone depending on that may have problems if they write bash scripts that end up failing on other systems. It would be a bad habit to get into running commands with misspelled case.

    I think it was a bad choice for Mac OS X to be at all forgiving about case sensitivity. It's definitely caused me nightmares on Windows on numerous occasions.
     
  13. Damo01, Mar 5, 2011
    Last edited: Mar 5, 2011

    Damo01 macrumors regular

    Joined:
    Feb 11, 2010
    Location:
    Australia
    #13
    where exactly is this file located on your hard drive?

    use this
    Code:
    sudo rm -rf <filename> or <directory>
    I'm not liable for a loss of data from using this. Replace <filename> with the name of that file or replace <directory> with the directory name.



    There are only thing that why the command isn't working in the commandline is because you probably not in the right directory path where the file is exactly located on your hardrive in commandline. It other words...you open up the terminal commandline and the directory path the terminal commandline start from is your home directory. If the this file is not located in your home directory and tried you remove it in the home directory you won't be able to remove it because the file doesn't exist in that particular directory.
    When using the unix terminal commandline changing from one directory to another it works like a hierarchy.

    use the
    Code:
    cd
    command to change directory to another directory where this file is located. Or just drag in the terminal which all it does as already aforementioned all it going to is give you the path.

    and use
    Code:
    ls
    to display a list of files or directory
     
  14. RaceTripper macrumors 68030

    Joined:
    May 29, 2007
    #14
    That is only correct if you want to use relative paths. It's not necessary to cd into the file's directory if you use absolute paths, which is what the drag and drop a file into Terminal provides.

    I often don't bother to cd into a file's directory to execute command on it.

    What we gave the OP to try should work just fine, without using cd.
     
  15. abez thread starter macrumors newbie

    Joined:
    Mar 5, 2011
    #15
    I'm probably just using the wrong words, The file can be clicked and held on and dragged around but won't place any where or enter its directory into the terminal or delete.
     

Share This Page