Quick Question...

VeeDubbs

Limp Gawd
Joined
Dec 9, 2005
Messages
398
Hi all,

Coming back to Linux after a while away...

Using RedHat 9...my friend is currently using SSH to remotely "do stuff"...don't ask, we know what we're doing ;)

Is there a command that will show me what folder he is currently in? Is it an option of finger? Or is it not possible? THanks!
 
lsof |grep hisusername |grep cwd

that's the best i can think of, i guess. it could probably be finetuned a little more, at the very least, but my brain is too tired to consider the possibilities.
 
if you know what you're doing then you would have already solved this problem wouldn't you.

just saying you are using SSH is good enough, no reason to only make us suspicious where had you simply said "ssh" we wouldn't have given it a second thought.

anyways similar to jillande's suggestion: lsof | grep hisusername | grep cwd | grep bash is probably your best bet. If you use some other shell then replace bash with said shell.
 
Back
Top