You are a frequent user of your school's UNIX system, as is the object of your affection. If you can't be there with him/her (let's be real--her) as she uses her computer, because you have never spoken to her (or a court order precludes you from ever doing so again), here's the next best thing. I have begun to compile a list of commands that you can use to stalk the girl of your dreams, commands that may lead you to a better understanding of her that you can exploit when you finally work up the courage to meet her. Or, commands that might just drive you further toward the brink of insanity.
I'm not quite sure what ps does, technically. Save that crap for people who are obsessed with computers. If you are instead obsessed with an unattainable woman (one who uses UNIX, and if a woman unattainable to you is a a frequent user of UNIX, maybe it's time to reassess your life), here's how to use it to your advantage:
If you discover that the girl with whom you are obsessed is using the same unix machine that you are, you want to use a ps command. A ps command can tell you what is going on with the users of the machine. There are several options that you can use with it, but we only care about the "ps -aux" option. This allows us to see what each user is doing. Combining it with the grep command allows us to specialize-- whatever she (let's call her Rachel, with a userid of rachel) is doing will be printed out with the following command:
% ps -aux | grep rachel
This allows us a brief, discrete snapshot of what rachel is doing at the time that you enter the command. That's fine for the stalking dilettante. The truly obsessed will appreciate a continual flow of output. To do this, you will have to open an extra window, as this output will completely consume your screen. One extra window is a small price, to pay, though for a lifetime of happiness. This brings us to the next lesson,
I think this might only be offered in the tcsh shell. If you aren't working in a tcsh shell, try typing
% tcsh
at the prompt. Maybe it works, maybe it doesn't. I have no idea. But, if you are, you are able to use while loops, which allow for a continuous flow of information about what commands rachel, our purely hypothetical stalkee, is doing.
% while 1
this brings up a while prompt.
while? ps -aux | grep rachel
Since this is all that we have to do, at the next prompt, we:
while? end
type end. This will provide a continuous flow of information about what rachel is doing. There will be a lot of chaff, background processes that tell us nothing about what she is doing, but we can pick from it wheat like the following:
rachel 20138 0.0 0.7 1928 1648 pts/11 S 09:53:33 0:02 mail adam
From this, we can see that rachel is mailing the user named "adam," despite the fact that she claims to be ONLY FRIENDS with him, and despite the fact that adam has claimed to have cut off communication with her. It is so F*CKING IMPERATIVE that she contact him that she JUST HAS TO MAIL him. I'm going to shove that--
Anyway, as you can see, occasionally, one can glean useful information from "ps -aux." What if, though, you are on a different unix machine than she is, though on the same overall computing system? Assuming that the machine is publicly accessible, we can use a command that allows for remote stalking. This brings us to
As little as I understand about ps-aux, I understand less about rsh. Here is how you can use it:
You, "Ron," are on unix16. "Rachel" is on unix23, a different, though publicly accessible, unix. While still using the while procedure detailed above, instead of
while? ps -aux | grep rachel
you want:
while? rsh unix23 "ps -aux" | grep rachel
The quotes are not a typo. This will allow the same comforting stream of information about rachel's processes. But what if, due to a momentary lapse in vigilance, you weren't logged on when she was? Here's a hypothetical situation--you, "Ron," fell asleep, and are unsure as to whether "rachel" was on last night, or whether or not she was on at the same time as "adam," chatting up a F*CKING STORM and RIPPING YOUR F*CKING HEART OUT. This can be checked by using
The last command gives, with some error,a history of the times that a user has been logged on to the computing system. It is recommended that it is used with a more command, which allows you to quit when you have found out what you need to know:
% last rachel | more
I admit, my list contains only a few, rudimentary means of using unix to learn more about the woman that you love. If you have access to more advanced means (anything from scripts that allow one to see if a certain user has been idle to commands that I may have missed), please e-mail me. There needs to be more communication of these methods of modern love.
Please. Let's end the silence that kills.