Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have a quick question , This happened to me when I was logged in as a regular user in a production server . I was executing few commands , the person who was helping me was logged into the same host from another location (NY or something).I executed a script which is not accurate for that version of application running in the host . Then he pinged me via Microsoft communicator and instructed me not to use that script rather to use correct script for that version.
From then I was intrigued by how he found that out , I know that if one has root access he can view other users command history file but even root cannot tail the command history file.root can only cat the file once the user has ended the session.
Although "top -U username" will briefly show the command executed by the user.
Anyone here has any idea of how to tail other users commands or tail their command history file when they are in action.
Result of the script is not something logged anywhere or it doesnt leave any trace around , and yes the 2 scripts names are different.
As far as i knew "w" command will only show who logged in from where and time. Am not sure about what you mean by "He can even tail it with the use of a fifo pipe" could you please elaborate
21:18:52 up 9:14, 5 users, load average: 0.73, 0.83, 0.67
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root tty1 - 12:06 6:20m 0.16s 0.01s /bin/sh /usr/bin/startx
root pts/0 :0 14:58 6:20m 0.00s 1.09s kded4
root pts/3 :0.0 20:59 0.00s 0.02s 0.00s w
You'll notice that with who you get what you mentioned. The output of w also lists what the logged on users are currently doing. A fifo pipe is like a wormhole to which you can send data. You create it using:
and then you can send data to it from another console, another user, whatever you like. And you can follow it (fifo = first in first out) with the tail command on your console:
tail -f nameyougive
So if you then have like a little script that executes:
w > nameyougave
in a loop with a sleep interval of 30 seconds, you can kind of follow what your logged on users are doing.
The use of named pipe doesn't seem to work the expected way . whichever command (w , who , top -U <username>) doesn't seem to work the exact way as expected , none of the command redirected into the named pipe seems to show what that user is executing ,Is there any other way to accomplish the intial cause of this thread