Ting Vit.html file I can not get rid of

Discussion in 'Mac Programming' started by SURF2DY, Jun 4, 2008.

  1. SURF2DY macrumors newbie

    SURF2DY

    Joined:
    Jun 4, 2008
    #1
    I have tried everything to delete this file
    Renaming
    Terminal (rm -rt)
    nothing works...Can anybody help?
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    Are there any other .html files you need to keep in the same directory? If not rm *.html would likely work. Why can't you delete it? Permission denied or you can't get the system to accept the filename?
     
  3. SURF2DY thread starter macrumors newbie

    SURF2DY

    Joined:
    Jun 4, 2008
    #3
    every time you try to rename it, it will not let you and
    an unexpected error occurred (error code -43) appears
     
  4. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #4
    In the worst-case scenario, you should be able to move anything of value in the directory and any subdirectories then rm -rf the containing directory. I doubt even a very wily file would have the skills to prevent the directory it's in from being blasted.

    Another tact might be to rename it. That may be tough, but the first letter seems pretty standard. You might try to just type:
    mv Ti<tab>
    and see if tab completion gives you a nicely escaped filename. If so, just type an easier filename as the second argument and hopefully it will be moved successfully.

    If things get particularly dire using find with an exec directive might work, but I can't say so for sure.

    -Lee
     
  5. SURF2DY thread starter macrumors newbie

    SURF2DY

    Joined:
    Jun 4, 2008
    #5
    I've tried both options above and still no luck
    the rm -rf states:
    rm: illegal option -- /
    usage: rm [-f | -i] [-dPRrvW] file ...
    unlink file
    and
    renaming it anything wont work it just gives you the error message
    (error code -43)
     
  6. yeroen macrumors 6502a

    yeroen

    Joined:
    Mar 8, 2007
    Location:
    Cambridge, MA
    #6
    Whenever I have to remove a file with a name the shell doesn't recognize, I have to include the directory it's as as argument to rm, as such:

    rm -f ./*.html

    Assuming you don't mind blowing away any other html files in that directory, does that line work?

    The (-43) error is most likely the value of the shells 'errno' variable. You can look it up in /usr/include/errno.h to see what 43 maps to. It can vary from system to system, but on Linux I see:

    ...
    #define EIDRM 43 /*Identifier Removed*/
    ...
     
  7. SURF2DY thread starter macrumors newbie

    SURF2DY

    Joined:
    Jun 4, 2008
    #7
    Thanks - tried it and it still does not get rid of the file
     
  8. yeroen macrumors 6502a

    yeroen

    Joined:
    Mar 8, 2007
    Location:
    Cambridge, MA
  9. Sayer macrumors 6502a

    Sayer

    Joined:
    Jan 4, 2002
    Location:
    Austin, TX
    #9
    -43 is a fine not found error.

    You should run Disk Utility and verify the hard drive. You prolly have some bad data on the disk.

    If you have any Mac OS X disc, or the discs that came with the Mac boot from one and run Disk Utility to repair the drive.
     
  10. HiRez macrumors 603

    HiRez

    Joined:
    Jan 6, 2004
    Location:
    Western US
    #10
    Why not move everything else in that folder into a temporary folder, then delete the whole folder, create a new one, and move the old stuff back. But I agree with Sayer, verify the disk and permissions first.
     
  11. SURF2DY thread starter macrumors newbie

    SURF2DY

    Joined:
    Jun 4, 2008
    #11
    Thank for all your help, but this file is not going anywhere.
    The file "Tiếng Việt.html" is in it's own folder called "Legal"
    I can delete the whole folder but then it just sits in the trash
    and will not permanently delete, it will just stay in the trash
    all other items in the trash get deleted but this folder will not go

    Any other ideas?
     
  12. yeroen macrumors 6502a

    yeroen

    Joined:
    Mar 8, 2007
    Location:
    Cambridge, MA
    #12
    What are the ownership and permissions of the parent Legal directory? If you do an

    ls -l Legal

    who's are they owned by and is the sticky bit set (a 't' at the end)? If it the sticky bit is set, even if you have write permission to the directory, if the .html file isn't owned by you won't be able to delete it.

    Just sudo to root and try removing it then.
     
  13. SURF2DY thread starter macrumors newbie

    SURF2DY

    Joined:
    Jun 4, 2008
    #13
    This is what I get when I try ls -1 Legal
    lb0004:~ sandymartinez$ ls -1 legal/Users/sandymartinez/Desktop/Legal.rtf/
    ls: legal/Users/sandymartinez/Desktop/Legal.rtf/: No such file or directory

    I dont know what sudo to root is?

    Thanks for all your help, but I guess Im just going to have to
    live with this file in the trash.:apple:
     
  14. operator207 macrumors 6502

    Joined:
    Jul 24, 2007
    #14
  15. yeroen macrumors 6502a

    yeroen

    Joined:
    Mar 8, 2007
    Location:
    Cambridge, MA
    #15
    You want to type ls -l (the letter 'l', not the number '1') to get the full listing with permissions, so type as shown:

    ls -ld ~/Desktop/Legal.rtf

    ls -l ~/Desktop/Legal.rtf


    This prints out the directory and file permission bits. Post them here when you're done.

    Sudo'ing to root means switching to the root user, where you enjoy omnipotent godlike privileges on your system. You can remove the file as root in one shot by typing:

    sudo rm -R /Users/sandymartinez/Desktop/Legal.rtf

    I left off the 'f' option here so rm will prompt you to make sure you want to delete (this protects you in case you put a space between '/' and 'Legal.rtf', which would otherwise blow away your entire desktop..every UNIX user has accidentally done this to their horror sometime in their lives). Unless some process has the contents of this file memory mapped (which I doubt), this will remove the file.
     
  16. SURF2DY thread starter macrumors newbie

    SURF2DY

    Joined:
    Jun 4, 2008
    #16
    Code:
    lb0004:~ sandymartinez$ ls -ld ~/Desktop/Legal.rtf
    drwxrwxrwx   3 sandymar  admin  102 Jun  5 13:35 /Users/sandymartinez/Desktop/Legal.rtf
    lb0004:~ sandymartinez$ ls -l ~/Desktop/Legal.rtf
    ls: Tiếng Việt.html: No such file or directory
    lb0004:~ sandymartinez$ sudo su
    lb0004:/Users/sandymartinez root# rm -R /Users/sandymartinez/Desktop/Legal.rtf
    rm: /Users/sandymartinez/Desktop/Legal.rtf/Tiếng Việt.html: No such file or directory
    rm: /Users/sandymartinez/Desktop/Legal.rtf: Directory not empty
    lb0004:/Users/sandymartinez root#
     
  17. JNB macrumors 604

    JNB

    Joined:
    Oct 7, 2004
    Location:
    In a Hell predominately of my own making
    #17
    Silly question, but have you tried rebooting after placing the file (or entire directory) in the Trash, then after restart, emptying the Trash?

    Another utility that's never failed for me is SuperEmptyTrash.
     
  18. SURF2DY thread starter macrumors newbie

    SURF2DY

    Joined:
    Jun 4, 2008
    #18
    I have tried to reboot and it still will not delete
    Also just tried your SuperEmptyTrash and it wont get rid of the files either
    it says the directory is not empty
     
  19. yeroen macrumors 6502a

    yeroen

    Joined:
    Mar 8, 2007
    Location:
    Cambridge, MA
    #19
    You either have a corrupted inode or (more likely) the Tieng file has non-printable characters in the file name.

    If you go into the Legal.rtf directory and type in

    rm -f *Ti*

    does that remove it?
     
  20. JNB macrumors 604

    JNB

    Joined:
    Oct 7, 2004
    Location:
    In a Hell predominately of my own making
    #20
    OK, I kinda doubted based on your reports thus far that it would work, but sometimes it's the little things that get overlooked.
     
  21. SURF2DY thread starter macrumors newbie

    SURF2DY

    Joined:
    Jun 4, 2008
    #21
    How do you get into the directory?
     
  22. yeroen macrumors 6502a

    yeroen

    Joined:
    Mar 8, 2007
    Location:
    Cambridge, MA
    #22
    cd /Users/sandymartinez/Desktop/Legal.rtf
     
  23. SURF2DY thread starter macrumors newbie

    SURF2DY

    Joined:
    Jun 4, 2008
    #23
    still does not remove it

    lb0004:~ sandymartinez$ cd /users/sandymartinez/desktop/legal.rtf
    lb0004:/users/sandymartinez/desktop/legal.rtf sandymartinez$ rm -f*ti*
    rm: illegal option -- *
    usage: rm [-f | -i] [-dPRrvW] file ...
    unlink file
     
  24. yeroen macrumors 6502a

    yeroen

    Joined:
    Mar 8, 2007
    Location:
    Cambridge, MA
    #24
    you need to put a space between the 'f' and the first '*', and use a capital 'T', exactly as so:

    rm -f *Ti*
     
  25. SURF2DY thread starter macrumors newbie

    SURF2DY

    Joined:
    Jun 4, 2008
    #25
    Noted, but I have tried it both ways and it still does not get rid of the file
    lb0004:~ sandymartinez$ sudo su
    Password:
    lb0004:/Users/sandymartinez root# cd /users/sandymartinez/desktop/legal.rtf
    lb0004:/users/sandymartinez/desktop/legal.rtf root# rm -f *Ti*
    lb0004:/users/sandymartinez/desktop/legal.rtf root#
    and w/out sudo to root
    lb0004:~ sandymartinez$ cd /users/sandymartinez/desktop/legal.rtf
    lb0004:/users/sandymartinez/desktop/legal.rtf sandymartinez$ rm -f *Ti*
    lb0004:/users/sandymartinez/desktop/legal.rtf sandymartinez$
     

Share This Page