Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Christopher11

macrumors 6502a
Original poster
Feb 10, 2007
707
66
Hi. I have three terribly stubborn old mp3 files that I can't seem to delete. I only found out about them because SuperDuper failed to copy my HD and profile, and cited these files as the reason. They're corrupted or something; or the OS thinks they're in use and won't delete them. It's an issue because I can't smart copy my entire drive to an external HD with SuperDuper.

Tonight I tried moving them to the Shared folder, then logging in as another user. Then I trashed the files as that user, and tried to empty trash. Still no luck.

I do hope you have a solution, and thank you most sincerely in advance for any replies.
 
Try deleting them from a Terminal window.
Open Terminal and enter (sudo rm -rf ), thats sudo, space, rm space -rf, space
now drag the file you want deleted into the Terminal window to complete the command.
Press Return and enter your password when prompted.

Please report back if you are successful.
 
  • Like
Reactions: BrianBaughn
Thank you but it again tells me, in Terminal, 'Invalid Argument'
[doublepost=1551659993][/doublepost]I did exactly as you said, and even tried entering the sudo command by typing it as well as copying and pasting, made sure a space after sudo rm -rf, and it still tells me invalid argument. Any other suggestions? I'm all ears. Thank you guys sincerely.
 
Hey Brian, and all who were so kind to help. I am still having this issue and want to delete these three troublesome mp3 files so I can start backing up my entire HD again via SuperDuper. I entered sudo rm -rf into Terminal as written above. Then I dragged an mp3 file from the trash into Terminal, following the command line, and hit return.

It tells me:
Christophers-macbook:~ Christopher$ sudo rm -rf/Users/Christopher/.Trash/Aimster/TonyBennett-OldDevilMoon.mp3␀␀␀
rm: illegal option -- /
usage: rm [-f | -i] [-dPRrvW] file ...
unlink file
Christophers-macbook:~ Christopher$

Thus indicating, illegal option. What should I do next!? Thank you for any help.
 
Hey Brian, and all who were so kind to help. I am still having this issue and want to delete these three troublesome mp3 files so I can start backing up my entire HD again via SuperDuper. I entered sudo rm -rf into Terminal as written above. Then I dragged an mp3 file from the trash into Terminal, following the command line, and hit return.

It tells me:
Christophers-macbook:~ Christopher$ sudo rm -rf/Users/Christopher/.Trash/Aimster/TonyBennett-OldDevilMoon.mp3␀␀␀
rm: illegal option -- /
usage: rm [-f | -i] [-dPRrvW] file ...
unlink file
Christophers-macbook:~ Christopher$

Thus indicating, illegal option. What should I do next!? Thank you for any help.

Hmm. What's that gibberish at the end of the file name (␀␀␀)
 
Hey Brian, and all who were so kind to help. I am still having this issue and want to delete these three troublesome mp3 files so I can start backing up my entire HD again via SuperDuper. I entered sudo rm -rf into Terminal as written above. Then I dragged an mp3 file from the trash into Terminal, following the command line, and hit return.

It tells me:
Christophers-macbook:~ Christopher$ sudo rm -rf/Users/Christopher/.Trash/Aimster/TonyBennett-OldDevilMoon.mp3␀␀␀
rm: illegal option -- /
usage: rm [-f | -i] [-dPRrvW] file ...
unlink file
Christophers-macbook:~ Christopher$

Thus indicating, illegal option. What should I do next!? Thank you for any help.
You need a space between the rf and the file path.
 
  • Like
Reactions: BrianBaughn
Hey! I was so excited to try this, and in Terminal tried dropping the .mp3 in after this command sudo rm -rf and a space.
Right after the rf I dropped in the mp3, and still it tells me 'invalid argument'. I tried dragging the mp3 files out of the trash, and doing this from the desktop. And from within the trash. Still no luck.

Any more ideas? I truly would like to be able to back up my entire HD and profile via SuperDuper.

FYI, they were in an old folder called Aimster. Dragging them in or out doesn't seem to make a difference at this point. Thank you in advance for any more ideas.
 
unable to delete files:
-try to "Move" the files, maybe into the trash
-log in as a different user
-get a copy of a 3rd party finder with a 30 day free trial
-open up a "Get Info" screen for the file and modify read write permissions

-another method: //this works in some cases, not others
high light the file of choice
see the Finder "Action" icon and pull it dwn
select "Show Package Cantonese"
if any of this works you will see a tree of hidden files
delete the hidden files from the bottom up

i have had several files that Finder was unable to delete
-never was able to get terminal to do any better than Finder was able to
-in the Terminal window; you might try a linux Touch command on the file


good luck, i know it is frustrating. I wish Apple would consider doing some needed maintance on the Finder app
this is one of reason why your employer's IT department cringes when they see a MAC
mac's are great for youtube and surfing, maybe email too.
 
Last edited:
Hey guys. I tried using a delete command in Terminal, and it gave me the following message. Hopefully this helps you help me. Does this mean the finder believes an application is using the mp3 file?

usage: rm [-f | -i] [-dPRrvW] file ...
unlink file
 
Please copy and paste from your terminal window, including the line that displays the command that you used.
The "usage: ... " usually indicates that there is a problem with the command and the options that you used with that, so you need to show the command as the terminal showed it. (It's really easy to miss a needed space, or have too many spaces!)
 
If permissions are the issue, you could try using chmod to change permissions on the file if changing them through the Finder doesn't work. Alternatively use sudo when using rm (so that it looks like sudo rm) to override any permissions.
 
Hi peeps, sorry to jump in the middle of this. I have the exact same problem but I'll carefully go through the thread and report back. I wanted to note that christopher11 isn't a rare case. Thanks, ttys!
 
Thank you sincerely leonsociety. Any luck? I sure want to resolve this!
[automerge]1588361858[/automerge]
Also, to the general group, tell me please: I am about to buy a 2012 Mac Pro, and intend to migrate my User profile with apps installed, etc. It's El Capitan. Does this mean my new computer would inherit this problem?

Thank you for any help.
 
Hey Christopher11, I seem to have fixed it, I had the exact same thing show up in my terminal. I copied it below just for reference for everybody to see. Obviously, my mac name was different, but everything else was EXACTLY the same. The reason this came up is because I was trying to permanently delete some files. Anyway, see below.

your example:
rm: illegal option -- /
usage: rm [-f | -i] [-dPRrvW] file ...
unlink file
Christophers-macbook:~ Christopher$


My solution:
I logged off,
restarted my computer,
ran repair disk permissions,
restarted my imac again,
opened terminal,
typed: sudo rm -R (one space after capital R)
dragged the item from the trash to the terminal,
hit enter,
typed my password,
and my file was deleted without any problems or messages.

Honestly, not even sure if i did it correctly with this command but my files seem to deleting properly now.

BTW i have an OLD iMac:
iMac5,1
Intel Core 2 Duo
2.16 GHz
Mac OS X 10.6.8

maybe it's because of that.
Anyway, thanks for your original questions and everybody else here.
 
Ouch, no dice! I am in El Capitan. I ran Disk Utility, restarted, then entered sudo rm -R in Terminal. I left a space after the R and hit return, still getting same 'Invalid Argument' response.

I should mention, those three files aren't even in the trash anymore, Mac won't let me put them in the trash. They just sit on the desktop now. Does that change the process on this? I can't even trasht hem.

I do hope I get this resolved at some point. Thank you leonsociety and all above.
 
Ouch, no dice! I am in El Capitan. I ran Disk Utility, restarted, then entered sudo rm -R in Terminal. I left a space after the R and hit return, still getting same 'Invalid Argument' response.

I should mention, those three files aren't even in the trash anymore, Mac won't let me put them in the trash. They just sit on the desktop now. Does that change the process on this? I can't even trasht hem.

I do hope I get this resolved at some point. Thank you leonsociety and all above.
You missed an action in the original answer.
  1. Open Terminal and enter (sudo rm -rf ), thats sudo, space, rm space -rf, space
  2. now drag the file you want deleted into the Terminal window to complete the command.
  3. Press Return and enter your password when prompted.
The second line adds the full path and file name to the rm command. This is a short cut method to avoid typing the full path and file name.

DS
 
No, that sounds excellent. Is that the same as this only I would add Desktop instead of Documents? I found it on the Web:

  1. Type cd ~/Documents then and press Return to navigate to your Home folder.
  2. Type lsthen Return (you type Return after every command).
[automerge]1589157162[/automerge]
You missed an action in the original answer.
  1. Open Terminal and enter (sudo rm -rf ), thats sudo, space, rm space -rf, space
  2. now drag the file you want deleted into the Terminal window to complete the command.
  3. Press Return and enter your password when prompted.
The second line adds the full path and file name to the rm command. This is a short cut method to avoid typing the full path and file name.

DS
Thank you. I believe I did all this, and it does ask me for my password at that time, which of course I entered. I dragged the file to the Terminal window, right after my cursor at the end of the command. Then hit return, and entered my password. Should that get it done?
 
I tried it again, with the spaces as you kindly explained. I get the Command Not Found error again, after entering my password.
 
This will go much more quickly if you would (as my math teacher used to say):
Show your Work!
Screen shot of your terminal window, showing what you typed, and the resulting error lines.
Terminal is pretty simple, but also really easy to mis-type. A missed space, or an extra space is sometimes hard to diagnose, when a screen shot sometimes makes it easy, for those who use terminal often, to see that mis-typed command, and come back with some helpful suggestions to get you back on track.
 
Christopher11,
I just did it again to verify my computer is processing the command, I deleted mp3 and wav files, but it works just fine.
I open Terminal, and take every step as I explained above. Sorry to hear the trouble.

I read my instructions above, and everything remains the same. Except, I don't restart or use Repair Disk option anymore but it looks like i don't have to, as I get no errors.
Hopefully you find better answers than this.
Anyway, thanks everyone!
 
Make sure this is what you're typing, where exampleFile.mp3 is replaced with the file(s) you need to delete. Hope this helps!
Screen Shot 2020-05-11 at 6.44.22 AM.png
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.