Can't remove file in terminal!!! [unix]

in Genius Bar edited January 2014
well here's pretty much my problem:

[localhost:~/desktop/music] user% ls

name B??????r.mp3

[localhost:~/desktop/music] user% rm name B??????r.mp3

Too many ('s.

[localhost:~/desktop/music] user% cd desktop


[localhost:~/desktop] user% rm -R music

rm: music/name B??r.mp3: No such file or directory

rm: music: Directory not empty


Nothing in this folder will show in finder...btw


  • Reply 1 of 8
    jutusjutus Posts: 272member
    Try this:

    From ~/desktop/

    > rm -rf music


    - j
  • Reply 2 of 8
    Use qoute marks around the filename: 'B????.mp3'. The problem is due to the fact that ?'s are wildcard charachters in the shell. By surrounding them with ' ' they are treated as literals.
  • Reply 3 of 8
    thuh freakthuh freak Posts: 2,664member
    I had a similar problem (I'm certain that LimeWire caused it), where several [seeming] mp3s were garbage. They showed up in terminal, and they'd sometimes (!) show up in the finder. I tried rm'ing them in all kinds of ways. I couldn't even mv them to a more kosher name. the only thing i got to work was to restart into os 9. I trashed/emptied them there, and stopped using limewire (which sux).
  • Reply 4 of 8
    newnew Posts: 3,244member
    well, none of the tips worked. I refuse to use OS 9 to solve this. I've promised myself that this machine is gonna be "OSX only", and I havn't been in OS9 for months. If this can't be solved from the terminal... then unix isn't all that... (ofcourse you can fix this from terminal. I'm just not good enough)

    btw: aqustion was the program that made the bad file/folder...
  • Reply 5 of 8
    rm -f B*.mp3

  • Reply 6 of 8
    If that doesn't work, cd music and

    ls -al

    and tell us the output.

    edit: And also try deleting the folder through the GUI (trash it)

    [ 02-10-2002: Message edited by: stimuli ]</p>
  • Reply 7 of 8
    newnew Posts: 3,244member
    Deleting the Music folder through the GUI (finder):

    "The operation cannot be completed because one or more requiered items cannot be found.

    (Error code -35)."

    I shortened the name in my last post, but this is the real deal, I just cahnged my username to user:

    ls -al:

    [localhost:~/desktop/music] user% ls -al

    ls: Ayo Feat. Ken, Petter, Big Fred - Hip-Hop (Dissar Looptroop] B??r.mp3: No such file or directory

    total 0

    drwx------ 3 user staff 58 Jan 29 09:02 .

    drwx------ 14 user staff 432 Feb 10 23:57 ..

    [localhost:~/desktop/music] user%
  • Reply 8 of 8
    Starting to type the file name and then hitting tab will cause the terminal to finish off what you're typing-- or at least try to.
Sign In or Register to comment.