Can't empty trash with "recursive" folders

Discussion in 'macOS' started by blinkfrog, Dec 17, 2009.

  1. blinkfrog macrumors member

    Joined:
    Mar 10, 2009
    #1
    After my experiments with Applescript and Automator there was some folder created with another folder inside consist of first folder consist of second folder consist of first folder and so on.
    Placed it to trash and tryed to empty - but without results. Tryed emptying with option key, tryed secure emptying, tryed rm -rf ~/.Trash command and also
    cd ~/.Trash
    sudo rm -r `ls -a`

    and also other variants with rm - no results. There are no any error mesages (like "files in use"), just nothing happens.
    10.5.8. Disk permissons are all ok.
    Shot of trash with folders opened to some deep.
     
  2. Mumford macrumors regular

    Mumford

    Joined:
    Oct 8, 2006
    Location:
    Altadena, CA
    #2
    Interesting. I wouldn't mind seeing the output of ls -lR ~/.Trash to see if these are just softlinks. Try this for deleting:

    cd ~/.Trash
    sudo chflags -R nouchg *
    sudo rm -rf *


    Make sure you're in ~/.Trash before running that rm command or you could do some serious damage.
     
  3. mac2x macrumors 65816

    Joined:
    Sep 19, 2009
    #3
    Make damn sure!
     
  4. blinkfrog thread starter macrumors member

    Joined:
    Mar 10, 2009
    #4
    Thank you.
    Tryed, nothing happens.
    That's interesting: there are no any messages after any command working with trash. Even "ls" display nothing. Tryed to place other, "good" files (which are deleting during emptying trash) into trash, but "ls" does not display it.
    Likely trash is cursed. :confused:
     
  5. Mumford macrumors regular

    Mumford

    Joined:
    Oct 8, 2006
    Location:
    Altadena, CA
    #5
    So ls -lR ~/.Trash showed nothing? How about ls -alR ~/.Trash?

    Do you have, or have you recently had an external harddrive connected? If so, what's the output of ls -alR /Volumes/<external harddrive name>/.Trashes?
     
  6. Mal macrumors 603

    Mal

    Joined:
    Jan 6, 2002
    Location:
    Orlando
    #6
    Chances are the files aren't in your user trash. It's rare, but they could be in the volume trash, or as mentioned, in another volume's trash. Try dragging one of the files into the Terminal window and see what path it displays.

    jW
     
  7. blinkfrog thread starter macrumors member

    Joined:
    Mar 10, 2009
    #7
    O, thank you! It displays path "/Volumes/Data/.Trashes/", and ls is working so I tryed to rm it and trash emptied!

    /Data/ is my local second logical drive.

    So deleted files on logical drives placed into their own trashes, not to user trash?

    Thank you much guys Mal and Mumford for help!

    P.S. If it interesting, most long path that ls displayed was
    /Volumes/Data/.Trashes//501/resized 23-34-30/oboi_resized/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized/oboi/resized:
    Not so infinite so it is strange that usual GUI emptying doesn't worked.
     
  8. Mumford macrumors regular

    Mumford

    Joined:
    Oct 8, 2006
    Location:
    Altadena, CA
    #8
    They would have to be. If they were placed in user trash, they would first have to be copied from that drive to the drive your home directory is on... which you may not even have the space for if we're talking really large files.

    The length of that path is right around PATH_MAX (open a terminal type grep PATH_MAX /usr/include/sys/syslimits.h). That's why it didn't grow any larger.
     

Share This Page