A Question about Deleting files

Posted:
in Current Mac Hardware edited January 2014
Ok, i was trying to clean up a friends powerbook. I deleted a bunch of files he didn't need. He had a fake motion crack on there i tried to delete, but it said cannot delete file is open or something like that. Anyway i tried to force quit it but it is nowhere to be found. I can't shutdown the app. Is the a way to delete this file with it open? Many thatks to anyone who can help.

Comments

  • Reply 1 of 7
    rara Posts: 623member
    Quote:

    Originally posted by Matt C.

    Ok, i was trying to clean up a friends powerbook. I deleted a bunch of files he didn't need. He had a fake motion crack on there i tried to delete, but it said cannot delete file is open or something like that. Anyway i tried to force quit it but it is nowhere to be found. I can't shutdown the app. Is the a way to delete this file with it open? Many thatks to anyone who can help.



    Open the Terminal (found in /Applications/Utilities). Type the following at the prompt
    Code:


    lsof | grep filename



    and press return. filename should just be a first portion of the filename where no spaces occur. So if the filename was '02 Scentless Apprentice.m4a' I could type 'Scent' or 'Scentless' or even 'Apprentice.m4a' (without the quotes).



    You should get some output that looks like this:
    Code:


    iTunes 394 jeff 16r VREG 14,6 5660635 37966 /Volumes/FAT -- 02 Scentless Apprentice.m4a







    Then type
    Code:


    kill pid



    at the prompt (and press return). pid in my example is 394 (it's just the number listed after the first bit. Now you should be able to delete the file.



    [edit - if you care to know more about what exactly you're doing above, type man lsof or man grep or man kill at the Terminal prompt and press return.]
  • Reply 2 of 7
    Hey thatnks alot. I'll give that a try.
  • Reply 3 of 7
    Quote:

    Originally posted by Matt C.

    Ok, i was trying to clean up a friends powerbook. I deleted a bunch of files he didn't need. He had a fake motion crack on there i tried to delete, but it said cannot delete file is open or something like that. Anyway i tried to force quit it but it is nowhere to be found. I can't shutdown the app. Is the a way to delete this file with it open? Many thatks to anyone who can help.



    Does the dock tell you that particular app/item is open (little arrow at the bottom)? Or do you just get an alert after trying to delete the "copy", even that "copy" is not open/launched at all?



    Smells like cache related issue anyway.



    What you could do in the first place, - delete all cache files (local- and systemwide).



    How to:

    (local)

    ~library/Cache --> drag the entire folder into the bin. Log out and back.



    (system)

    Computer/Library/Cache --> drag the entire folder into the bin. Important, you should reboot afterward!



    There are third party utilities, which do the very same job (cocktail, maintain etc pp)



    perhaps that helps



    PS: What about repairing permissions? The easiest thing
  • Reply 4 of 7
    placeboplacebo Posts: 5,767member
    Quote:

    Originally posted by Matt C.

    Hey thatnks alot. I'll give that a try.



    Or open Activity monitor (Applications> Utilities> Activity Monitor), select the application in that list, and press Close Process (Force Quit).
  • Reply 5 of 7
    Its not in the dock. like i said the thing is a fake. if you launch it once nothing happens, but when you start up the computer somekind of diolouge pops up saying soemthing about trojen software. Its on my friends laptop so i haven't messed with it much.
  • Reply 6 of 7
    slugheadslughead Posts: 1,169member
    Quote:

    Originally posted by Matt C.

    Its not in the dock. like i said the thing is a fake. if you launch it once nothing happens, but when you start up the computer somekind of diolouge pops up saying soemthing about trojen software. Its on my friends laptop so i haven't messed with it much.



    Backup, format, reinstall if you want to play it safe.





    Otherwise, backup some specific items from his user folder, go into accounts, create a new one, delete his old one, and hopefully you'll be OK.
  • Reply 7 of 7
    placeboplacebo Posts: 5,767member
    Quote:

    Originally posted by Matt C.

    Its not in the dock. like i said the thing is a fake. if you launch it once nothing happens, but when you start up the computer somekind of diolouge pops up saying soemthing about trojen software. Its on my friends laptop so i haven't messed with it much.



    An application won't necessarily appear in the dock if it's a system-level application that runs in the background. As I said, see if you can find its name in the Activity Monitor.
Sign In or Register to comment.