[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: echo message to users screen



Mike Egglestone said:
> Hi,
> I'm looking for a way I can send a small message to a user
> that is logged into the same box as me.
> If I run
> # w
> to see who is logged in, then I would like to echo something
> to their screen so I can tell them something.


echo "THE COMPUTER IS ON FIRE LOG OFF NOW!!!" >>/dev/pts/X

where X is the tty they are logged in on

or you can do

echo "THE COMPUTER IS ON FIRE LOG OFF NOW!!" | wall

to send a message to everyone logged on

or you can do

write user
THE COMPUTER IS ON FIRE LOG OFF NOW!!
^D
(I think, been a few years since i used write)

to write to that specific user(on all terminals they are logged in
on I think)

most of my systems at most have 1-2 people logged in besides me so
I lean towards the wall method.

nate





Reply to: