‘lsof’ is a program on ‘UNIX-ish’ systems that lets you view open files, and which processes opened those files (from Wikipedia). Its really cool, caus you can use it on a Mac (or linux, whatever) to see what processes are writing to disks, whos looking at your shared files, etc. I used it on my Mac once to see who was listening to my iTunes shares :).
Even though most of you know me as the ‘Mac’ guy, I still use Windows of course. And here at work, we do have a few Windows clients, and we do support quite a few Windows servers, running 2000 or 2003. This morning I rush into work after my shower because a client couldnt access her profile through RDC. Basically, somehow, the machine had locked onto a file of hers, so when she tried to reconnect, it couldnt read her Profile.
This is where lsof would have been nice. Could search for all files matching that users name, and kill the bad proc. Not that easy :). Looking for ‘file locking on windows’ returned just a bunch of results with people/sysadmins/monkeys asking ‘LIKE OMG like how do I like lock a file or folder like my pron folder like so people like can not like get into it’. Great….
So then I come by this article on Wikipedia for file locking. If you look through the ‘File Locking in Windows’ section, they mention a great program, Process Explorer, from Sysinternals (this guy recently got hired by MS actually, or Sysinternals was taken over by microsoft).
This saved my life. After figuring out the UI, I just searched for the users name, and found the proc. that was holding on! Kill that proc, and the user is great! Looking around this program some more, it looks more like Task Manager on drugs! I may try this at home a little bit more to see all the different features, and if this tool can replace many other things missing in Windows…
Listening To: ‘Jump’ by Van Halen