piranha: red origami crane (Default)
[personal profile] piranha
when emptying the trash, i get "The operation cannot be completed because the item [some file] is in use." as far as i can see, it's not.

terminal. root.

lsof [filename] should generally show which app is hanging onto this file. nifty detail: open trash folder, type "lsof " (note trailing space) into terminal window, drag file in question from trash into terminal; that'll put the filename there complete with path. after lsof finds it, one can then close the app.

except it doesn't work in this case. lsof doesn't know about this file. something is b0rken.

force-quitting and relaunching the finder doesn't release the file either.

oh well. rm -f [filename] to the rescue.

that's very unixy though. i would like to know whether there's a more mac way of restoring order in trash land.

oh, and we now have over a foot of snow, and i don't want to drive anywhere, so the cats are getting canned food from the emergency reserves. i almost wish i hadn't whined about how it wasn't real good snow yesterday. :)

on 2006-11-28 02:30 (UTC)
sabotabby: raccoon anarchy symbol (Default)
Posted by [personal profile] sabotabby
This may be obvious and you've probably tried it, but have you looked to see if the file is locked? If so, you can unlock it and delete it.

At any rate, I didn't know about the lsof thing and I'm saving this in my memories for the next time I can't delete a file.

unlocking file

on 2006-11-28 04:29 (UTC)
ext_481: origami crane (Default)
Posted by [identity profile] pir-anha.livejournal.com
before i delved into this, that wouldn't have been obvious to me, so it was good of you to mention it. i'm really new to all things mac, and usually whip out terminal right away because i'm at home with unix. but that feels like cheating. :)

but yeah, i tried unlocking the file, and it didn't help.

on 2006-11-28 04:08 (UTC)
Posted by [identity profile] epi-lj.livejournal.com
There are some freeware trash force-cleaners that you can download.

They essentially just package the sudo rm -rf ~/.Trash command into a happy Mac-like app package with an icon you can click, though.

trash force-cleaners

on 2006-11-30 13:26 (UTC)
ext_481: origami crane (Default)
Posted by [identity profile] pir-anha.livejournal.com
thanks -- i think that's overkill for me, *heh*. but good to know there is nothing specific i've been missing.

on 2006-11-28 17:56 (UTC)
Posted by [identity profile] huashan.livejournal.com
Man lsof just kicks the asses that need the kickin'. I was so damned happy when I discovered that command and started installing it on everything I use.

on 2006-11-30 05:09 (UTC)
brooksmoses: (Default)
Posted by [personal profile] brooksmoses
Except that it doesn't kick them on Windows, because apparently there's no Cygwin port.

Though, when I went off looking for one, I found this, which looks to do the same sort of thing in a Windowsy way. And that certainly kicks summat wot needs kicking on my computer, so maybe that just means lsof can do kicking by proxy too. :)

process explorer

on 2006-11-30 13:24 (UTC)
ext_481: origami crane (Default)
Posted by [identity profile] pir-anha.livejournal.com
oh yeah, it rocks! though that link goes to ... huh. i see microsoft has acquired sysinternals now; how sad -- though at least they didn't kill this fine piece of software. did i never sing the praises of process explorer here? *searches*. apparently not. i must have done it on renderosity [1], because i remember how happy i was when i found that, during the time when i actually did acquire a virus despite double-checking every executable. i learned a lot about windows internals from it.

the only bad thing about PE is its footprint. at the time it ate a lot of power i needed otherwise.

[1] i hate, hate, hate forums. i participate in very few, but even so, that fragments my attention in too many places.

Profile

piranha: red origami crane (Default)
renaissance poisson

July 2015

S M T W T F S
   123 4
567891011
12131415161718
19202122232425
262728293031 

Most Popular Tags

Expand Cut Tags

No cut tags