Ralph Shumaker wrote:
John H. Robinson, IV wrote:
Since -e means all processes, get rid of that.
-u allows you to select by effectve UID.
$ ps -Hfu $USER
Well that example worked. (So it was the presence of -e when I tried
to invoke -u that brought up a usage crib sheet.) I figured that -u
would be a filter, not expansive. A simple ps only delivers two
items, which do *not* include what I wanted.
Now that I can see -u working, and expanding the list to include the
item(s) I want, I don't actually need the other switches, and can even
eliminate a couple of grep statements in the pipe. The best part is
that this script will be able to work for anyone, and affect only
their processes.
Thanks John.
A friend of mine doesn't have much patience for computers. She
sometimes just shuts off the power if the system seems hung.
Fortunately, she doesn't have files she cares about (or so she says
now). But it's inconvenient for me to go there and remove the lock file
left behind by Mozilla. I haven't set up tunneling, nor do I know how.
But I can send her this script as an attachment (along with a Mozilla
icon I modified). I'll see if I can get her to exercise enough patience
to save the attachments long enough for me to go and set them up.
Here's the script I devised:
$ cat ~/unlock-mozilla
#!/bin/bash
cd ~
echo \#!/bin/bash > ~/remove-mozilla-lock-file
ps -u $USER | grep mozilla-bin | sed -e 's/^\s*\([0-9]*\)[^!]*/kill -9
\1/' >> ~/remove-mozilla-lock-file
du -a | grep \./\.mozilla/.*/lock | sed -e 's/^[0-9]*\s*\.\//rm ~\//' >>
~/remove-mozilla-lock-file
chmod 700 ~/remove-mozilla-lock-file
cat ~/remove-mozilla-lock-file
~/remove-mozilla-lock-file
rm ~/remove-mozilla-lock-file
$
I made it so it would kill -9 any Mozilla programs currently running
under $USER, just in case she somehow switched to a different
workspace. She's fairly limited in knowledge of computers but *more*
limited in patience. She just needs it to work and have quick simple
solutions for when it doesn't. (I think I might reduce the number of
her workspaces down to one, juuuust to be on the safe side.)
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list