PC & IT SUPPORT MADE EASY FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Leave a message for local linux user

Go down

Leave a message for local linux user Empty Leave a message for local linux user

Post by jamied_uk 8th June 2016, 02:29

here:

Code:
mail -s "The subject goes here" jdoe







mail -s "The subject goes here" test



or  use text file

mail -s "The subject goes here" jdoe < textfile



or



echo “John, don't forget our meeting” | mail -s "Reminder" jdoe




https://unix.stackexchange.com/questions/21334/how-do-i-leave-a-message-for-another-local-user
jamied_uk
jamied_uk
Admin

Posts : 2951
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Leave a message for local linux user Empty Re: Leave a message for local linux user

Post by jamied_uk 8th June 2016, 02:38

jamied_uk
jamied_uk
Admin

Posts : 2951
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Leave a message for local linux user Empty Re: Leave a message for local linux user

Post by jamied_uk 8th June 2016, 02:40

Code:
Remote broadcast message (Fri Nov  8 13:49:18 2013):
jamied_uk
jamied_uk
Admin

Posts : 2951
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Leave a message for local linux user Empty Re: Leave a message for local linux user

Post by jamied_uk 8th June 2016, 02:41

Code:
sudo wall -n hi

Remote broadcast message (Fri Nov  8 13:49:18 2013):

hi

using echo

This alternative method is more of a hack, since it isn't done through an explicit tool but you can echo text out to a users' terminal assuming you know which one they're on.

Example

Code:
$ w
 13:54:26 up 2 days, 36 min,  4 users,  load average: 4.09, 4.20, 3.73
USER    TTY      FROM              LOGIN@  IDLE  JCPU  PCPU WHAT
saml    tty1    :0              Wed13    2days  3:55m  0.04s pam: gdm-password
saml    pts/0    :0.0            Wed13  24:16m  0.35s  0.35s bash
saml    pts/1    :0.0            Wed20    0.00s  3.71s  0.00s w
saml    pts/4    :0.0            01:20  12:33m  0.36s  0.05s man rsync
Assuming you know user
Code:
saml
is in fact on one of the pseudo terminals you can echo text to that device directly like so. From terminal
Code:
pts/1
:
Code:
$ sudo echo "Let's go have lunch... ok?" > /dev/pts/4
$
Result on
Code:
pts/4
:
Code:
$ man rsync
$ Let's go have lunch... ok?
jamied_uk
jamied_uk
Admin

Posts : 2951
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Leave a message for local linux user Empty Re: Leave a message for local linux user

Post by jamied_uk 8th June 2016, 02:55

jamied_uk
jamied_uk
Admin

Posts : 2951
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Leave a message for local linux user Empty Re: Leave a message for local linux user

Post by jamied_uk 8th June 2016, 02:56

jamied_uk
jamied_uk
Admin

Posts : 2951
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Leave a message for local linux user Empty Re: Leave a message for local linux user

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum