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

schwine1

macrumors regular
Original poster
Sep 13, 2008
182
4
I have a large number of duplicate .mp3 files to delete on my computer desktop, too many to delete manually.
Is there a way to delete them with a Terminal command or by another method?

The common text prefix that each .mp3 file contains is this phrase: Firefox 20180211
Thanks for any tips.
 
Last edited:

casperes1996

macrumors 604
Jan 26, 2014
7,598
5,769
Horsens, Denmark
rm is the remove command in Terminal, an "*" is a wildcard, which means "anything can go here".
Let's say they all end with that FireFox thing, you can do

rm "/path to where they all are, assuming they are in one folder/*Firefox 20180211.mp3"

You can also use rm in conjunction with utilities like grep and mdfind
 

schwine1

macrumors regular
Original poster
Sep 13, 2008
182
4
Solved the problem with this Terminal command: rm -R Desktop
Thanks.
 

casperes1996

macrumors 604
Jan 26, 2014
7,598
5,769
Horsens, Denmark
Which according to the OP's original post is exactly where the problem files were located.
Not how I would have done it but hey, whatever works...


But it also deletes everything else there. If this was what was intended, going to the desktop, hitting cmd+a and then cmd+backspace could've done the same
 

jbarley

macrumors 601
Jul 1, 2006
4,023
1,895
Vancouver Island
But it also deletes everything else there. If this was what was intended, going to the desktop, hitting cmd+a and then cmd+backspace could've done the same
That's the kind of tip the OP was looking for in his opening post, instead your suggestion of "rm" in a Terminal window pointed him to an alternate solution.
 

ssmed

macrumors 6502a
Sep 28, 2009
885
423
UK
Duplicate detective or Tidyup are the type of utility which will allow you do this with considerable confidence. worth it if you need to do more than one session.
 

casperes1996

macrumors 604
Jan 26, 2014
7,598
5,769
Horsens, Denmark
That's the kind of tip the OP was looking for in his opening post, instead your suggestion of "rm" in a Terminal window pointed him to an alternate solution.

OP explicitly asked for a Terminal command and never said that they were all in a shared folder with no other items in it
 

jbarley

macrumors 601
Jul 1, 2006
4,023
1,895
Vancouver Island
OP explicitly asked for a Terminal command and never said that they were all in a shared folder with no other items in it
Does this really sound explicit to you?
"Is there a way to delete them with a Terminal command or by another method?"
Anyhow it's not a big deal, he found a solution with your assistance.
 

casperes1996

macrumors 604
Jan 26, 2014
7,598
5,769
Horsens, Denmark
Does this really sound explicit to you?
"Is there a way to delete them with a Terminal command or by another method?"
Anyhow it's not a big deal, he found a solution with your assistance.


Sure, it's unimportant at this point. I didn't think about the part you emphasised to be honest. Only the first part. – Regardless, it also wasn't specified that they were all in one place with no other valuable files. If they were mixed up with hundreds of other files, cmd+a && cmd+backspace wouldn't be a good solution
 

Fishrrman

macrumors Penryn
Feb 20, 2009
29,238
13,307
OP wrote:
"The common text prefix that each .mp3 file contains is this phrase: Firefox 20180211"

What I'd try:

1. Download "EasyFind" (it's free):
http://www.devontechnologies.com/download/products.html

2. Open EasyFind. Set it up so that the drive you're going to operate on is selected in the right-hand popup menu (under the magnifying glass).

3. In the search bar, enter "Firefox 20180211"

4. Click the magnifying glass to start the search.

5. See what it brings up. Are these files you want to get rid of? Then... click the delete button (doing so should move them to the trash).

6. Empty the trash.

7. Done.
 

jbarley

macrumors 601
Jul 1, 2006
4,023
1,895
Vancouver Island
OP wrote:
"The common text prefix that each .mp3 file contains is this phrase: Firefox 20180211"

What I'd try:

1. Download "EasyFind" (it's free):
http://www.devontechnologies.com/download/products.html

2. Open EasyFind. Set it up so that the drive you're going to operate on is selected in the right-hand popup menu (under the magnifying glass).

3. In the search bar, enter "Firefox 20180211"

4. Click the magnifying glass to start the search.

5. See what it brings up. Are these files you want to get rid of? Then... click the delete button (doing so should move them to the trash).

6. Empty the trash.

7. Done.
Did you miss post#3, where the OP said...
"Solved the problem with this Terminal command: rm -R Desktop
Thanks."
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.