Leave a message for local linux user

View previous topic View next topic Go down

Leave a message for local linux user

Post by jamied_uk on 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
avatar
jamied_uk
Admin

Posts : 2260
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: Leave a message for local linux user

Post by jamied_uk on 8th June 2016, 02:38

Wall

http://www.computerhope.com/unix/wall.htm

Code:
sudo wall message.txt


https://unix.stackexchange.com/questions/99460/sending-messages-to-another-user
avatar
jamied_uk
Admin

Posts : 2260
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: Leave a message for local linux user

Post by jamied_uk on 8th June 2016, 02:40

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

Posts : 2260
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: Leave a message for local linux user

Post by jamied_uk on 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?
avatar
jamied_uk
Admin

Posts : 2260
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: Leave a message for local linux user

Post by jamied_uk on 8th June 2016, 02:55

https://unix.stackexchange.com/questions/99460/sending-messages-to-another-user
avatar
jamied_uk
Admin

Posts : 2260
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: Leave a message for local linux user

Post by jamied_uk on 8th June 2016, 02:56

https://encrypted.google.com/search?q=wall+for+linux
avatar
jamied_uk
Admin

Posts : 2260
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: Leave a message for local linux user

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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