How to delete large number of duplicate files?

Discussion in 'OS X El Capitan (10.11)' started by schwine1, Feb 13, 2018.

  1. schwine1, Feb 13, 2018
    Last edited: Feb 13, 2018

    schwine1 macrumors regular

    Joined:
    Sep 13, 2008
    #1
    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.
     
  2. casperes1996 macrumors 68040

    casperes1996

    Joined:
    Jan 26, 2014
    Location:
    Horsens, Denmark
    #2
    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
     
  3. schwine1 thread starter macrumors regular

    Joined:
    Sep 13, 2008
    #3
    Solved the problem with this Terminal command: rm -R Desktop
    Thanks.
     
  4. casperes1996 macrumors 68040

    casperes1996

    Joined:
    Jan 26, 2014
    Location:
    Horsens, Denmark
    #4
    ... Uhmmm. That recursively deletes everything in your desktop.....
     
  5. jbarley, Feb 14, 2018
    Last edited: Feb 14, 2018

    jbarley macrumors 68040

    jbarley

    Joined:
    Jul 1, 2006
    Location:
    Vancouver Island
    #5
    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...
     
  6. casperes1996 macrumors 68040

    casperes1996

    Joined:
    Jan 26, 2014
    Location:
    Horsens, Denmark
    #6

    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
     
  7. jbarley macrumors 68040

    jbarley

    Joined:
    Jul 1, 2006
    Location:
    Vancouver Island
    #7
    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.
     
  8. ssmed macrumors 6502

    ssmed

    Joined:
    Sep 28, 2009
    Location:
    UK
    #8
    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.
     
  9. casperes1996 macrumors 68040

    casperes1996

    Joined:
    Jan 26, 2014
    Location:
    Horsens, Denmark
    #9
    OP explicitly asked for a Terminal command and never said that they were all in a shared folder with no other items in it
     
  10. jbarley macrumors 68040

    jbarley

    Joined:
    Jul 1, 2006
    Location:
    Vancouver Island
    #10
    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.
     
  11. casperes1996 macrumors 68040

    casperes1996

    Joined:
    Jan 26, 2014
    Location:
    Horsens, Denmark
    #11

    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
     
  12. Fishrrman macrumors P6

    Fishrrman

    Joined:
    Feb 20, 2009
    #12
    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.
     
  13. jbarley macrumors 68040

    jbarley

    Joined:
    Jul 1, 2006
    Location:
    Vancouver Island
    #13
    Did you miss post#3, where the OP said...
    "Solved the problem with this Terminal command: rm -R Desktop
    Thanks."
     

Share This Page

12 February 13, 2018