Terminal Command File Delete Issues

Discussion in 'OS X Yosemite (10.10)' started by bretts75, Nov 16, 2014.

  1. bretts75 macrumors newbie

    Joined:
    Nov 16, 2014
    #1
    In moving large amounts of photos around I managed to fill my hard drive and my trash is also very full. I've tried every way to delete trash but all I get is the spinning beach ball. I'm realizing I most likely will need to do this with at the terminal.

    I've tried both:
    sudo rm -rf ~/.Trash/*
    and
    rm -rf ~/.Trash/*

    Both times I get the respone: Argument list too long.

    What can I add to my terminal line to address this. It's likely that I have a lot of files in my trash bin.
     
  2. boast macrumors 65816

    boast

    Joined:
    Nov 12, 2007
    Location:
    Phoenix
    #2
    If you know them, try adding some extensions to the end in order to reduce the list

    *.jpg
     
  3. bretts75 thread starter macrumors newbie

    Joined:
    Nov 16, 2014
    #3
    should I use the line with sudo or without? With sudo it pops up with a warning and asks me to ask password. I'm ok typing that but want to make sure I'm not missing something first
     
  4. boast macrumors 65816

    boast

    Joined:
    Nov 12, 2007
    Location:
    Phoenix
    #4
    If you get access denied errors, then use sudo.
     
  5. NoBoMac macrumors 65816

    Joined:
    Jul 1, 2014
    #5
    Shouldn't need sudo.

    If that fails (probably will if previous examples did):

    Code:
    cd ~/.Trash
    find . -type f -exec rm -f {} \;
    Will be a bit slow, but will get it done. At that point, if anything left, should be small enough amount of stuff Finder delete won't choke on it.
     
  6. bretts75 thread starter macrumors newbie

    Joined:
    Nov 16, 2014
    #6
    thanks. I did and used .jpg, .cr2, .doc, .docx, .pdf. Which should cover most of the files. Still get the Argument list too long if I use just *. Also still can't use my normal finder trash delete options.

    Any other thoughts to try?

    ----------

    thanks. trying this now.

    ----------

    ok. great. At least got my trash bin to empty. I hoped this would free up hard drive space ( i also deleted a lot of synced files in dropbox) but I still have the spinning wheel with using finder and can't access my hard drive. I can't even open it to delete more stuff. According to disk utility I'm full. Unforunately I didn't pay enough attention and Lightroom filled my drive. We'll see what I can do with this now.
     
  7. ssls6 macrumors 6502a

    ssls6

    Joined:
    Feb 7, 2013
    #7
    I always just do this

    rm -rf ~/.Trash

    The folder gets recreated
     

Share This Page