How do I delete files in use?!

Discussion in 'macOS' started by majordude, Jan 24, 2008.

  1. majordude macrumors 68020

    majordude

    Joined:
    Apr 28, 2007
    Location:
    Hootersville
    #1
    How do I delete files in use?

    I have a bunch of files... I must have had a HD burp or something. I have a bunch of files under "lost+found". I try deleting it but I can't!

    The folder has a bunch of other folders ("dir...") but I can't delete them! They are NOT in use as far as I can tell.

    HELP!
     

    Attached Files:

  2. EricNau Moderator emeritus

    EricNau

    Joined:
    Apr 27, 2005
    Location:
    San Francisco, CA
    #2
    Try holding "option" while pressing the delete button.
     
  3. sammich macrumors 601

    sammich

    Joined:
    Sep 26, 2006
    Location:
    Sarcasmville.
    #3
    Under the Finder menu, use 'Secure Empty Trash'. But I think the option click does this anyway.

    It takes a while longer if there is a lot of stuff though.
     
  4. McGiord, Jan 24, 2008
    Last edited: Jan 30, 2011

    McGiord macrumors 601

    McGiord

    Joined:
    Oct 5, 2003
    Location:
    Dark Castle
    #4
    Check the files/folder owner with Get Info then change their access privileges with your administrator account.
    I Belive if you drag them to the Trash while holding the option or cmd key will overrride any obstacle ( haven't use this in a while).
    If nothing of this works you may need to use the Unix terminal and use a command to delete them.
    ________
    magic flight launch box
     
  5. richard.mac macrumors 603

    richard.mac

    Joined:
    Feb 2, 2007
    Location:
    51.50024, -0.12662
    #5
    i dont like the secure delete option in Leopard its slow and sometimes hangs. logging out and back in should do it.
     
  6. majordude thread starter macrumors 68020

    majordude

    Joined:
    Apr 28, 2007
    Location:
    Hootersville
    #6
    Nope.

    Nope.

    Nope.

    Everything is still locked. :(
     
  7. sowillo14 macrumors regular

    Joined:
    Dec 14, 2007
    #7
    Put the files in the trash, and at the same time hit option, command, shift, delete.
     
  8. richard.mac macrumors 603

    richard.mac

    Joined:
    Feb 2, 2007
    Location:
    51.50024, -0.12662
    #8
    have you tried my suggestion majordude? maybe try a reboot if it doesnt work?
     
  9. 7084 macrumors member

    Joined:
    Sep 7, 2006
    #9
    I have this happen to me on the odd occasion, a reboot usually sorts it all out.
     
  10. Iamtherealwoody macrumors 6502

    Iamtherealwoody

    Joined:
    May 28, 2007
    Location:
    Gainesville, Florida
    #10
    If the files are still in use, I normally let the trash delete every thing that it can using option delete and then restart. Thats the only thing Ive found that works. This usually happens when I delete a program and its still running. You can also try to quit the process in activity monitor.
     
  11. majordude thread starter macrumors 68020

    majordude

    Joined:
    Apr 28, 2007
    Location:
    Hootersville
    #11
    I've rebooted but it doesn't help. It thinks the files are in use (and they obviously aren't). I still can't delete the folder. :mad:
     
  12. Mal macrumors 603

    Mal

    Joined:
    Jan 6, 2002
    Location:
    Orlando
    #12
    Ok, try this. Open Terminal, type "rm -rf " and then drag the Trash folder onto that window (or if you want, the folder that's giving you trouble), and then hit enter. If it gives you an error, add "sudo " to the beginning of the previous command and do it again. That shouldn't pay attention to whether those files are open in any OS X application, and especially not if they're not actually in use.

    jW
     
  13. majordude thread starter macrumors 68020

    majordude

    Joined:
    Apr 28, 2007
    Location:
    Hootersville
    #13
    Nope.

    ---

    Last login: Fri Jan 25 18:17:57 on console
    172:~ Home$ rm -rf
    172:~ Home$ /Volumes/External\ HD/.Trashes/501/1
    -bash: /Volumes/External HD/.Trashes/501/1: is a directory
    172:~ Home$ sudo rm -rf

    WARNING: Improper use of the sudo command could lead to data loss
    or the deletion of important system files. Please double-check your
    typing when using sudo. Type "man sudo" for more information.

    To proceed, enter your password, or type Ctrl-C to abort.

    Password:
    172:~ Home$ /Volumes/External\ HD/.Trashes/501/1
    -bash: /Volumes/External HD/.Trashes/501/1: is a directory
    172:~ Home$

    :mad::mad::mad:
     
  14. eRondeau macrumors 6502a

    eRondeau

    Joined:
    Mar 3, 2004
    Location:
    Canada's South Coast
    #14
    Just grasping at straws at this point, but is there any chance these originated on an external HD or memory stick? If you've used either one recently, plug it back in and try the normal Empty Trash.

    Try Repair Permissions and then try to Empty Trash again.

    Run Activity Monitor and look carefully to make sure there's nothing unexpected running in the background. If you see anything suspicious, stop the process and then try to Empty Trash.

    Weird.
     
  15. Luis macrumors 65816

    Luis

    Joined:
    Jul 19, 2006
    Location:
    Costa Rica
  16. majordude thread starter macrumors 68020

    majordude

    Joined:
    Apr 28, 2007
    Location:
    Hootersville
    #16
  17. Luis macrumors 65816

    Luis

    Joined:
    Jul 19, 2006
    Location:
    Costa Rica
    #17
    What do you mean the HD is running nuts? Whenever I had used the script I posted, the trash empties without even budging.
     
  18. majordude thread starter macrumors 68020

    majordude

    Joined:
    Apr 28, 2007
    Location:
    Hootersville
    #18

    Attached Files:

  19. majordude thread starter macrumors 68020

    majordude

    Joined:
    Apr 28, 2007
    Location:
    Hootersville
    #19
    I had 50GB in that stupid lost and found folder.
     
  20. Luis macrumors 65816

    Luis

    Joined:
    Jul 19, 2006
    Location:
    Costa Rica
    #20
    Oh. That changes things a little bit I guess.:D
     
  21. majordude thread starter macrumors 68020

    majordude

    Joined:
    Apr 28, 2007
    Location:
    Hootersville
    #21
    I have no idea what that crap was either. I'm thinking it was a Time Machine burp. Oh well, I never use it anyway so no harm done.
     
  22. SC68Cal macrumors 68000

    Joined:
    Feb 23, 2006
    #22
    http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/lostfound.html

     
  23. nerdbert macrumors regular

    nerdbert

    Joined:
    Nov 7, 2007
    Location:
    Berlin, Germany
    #23
    Not that it makes much difference after the problem is solved, but here's a simple shell trick. In terminal type:

    lsof | grep "filename you can't delete"

    This will tell you exactly which process is still using the file. Simply killing this process solves the problem most of the time. However, in case of lost+found I doubt it.
     
  24. balestra macrumors newbie

    Joined:
    Jan 30, 2008
    #24
    "Going nuts"? What do you mean? Don't scare me, mate :eek:

    I'm sure that Super Empty Trash won't cause any damage to your HD, and that's because I wrote it: it's a simple Applescript that actually query the Finder for trash content, then deletes such content recursively through a "sudo rm -Rf" command.
     
  25. majordude thread starter macrumors 68020

    majordude

    Joined:
    Apr 28, 2007
    Location:
    Hootersville
    #25

    Thanks for writing the program!
    :)

    My "going nuts" comment was my reaction to the noise coming from the disk as the script deleted 50GB of stuck files. If you have ever deleted that much information, you know the noise I'm talking about... if not, let's just say you know that there is a whole lot of data disappearing of one of your hard drives. ;)
     

Share This Page