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.
Thanks, but that doesn't seem to say anything about enabling the "you have new mail" message. The mail system is working fine, but I have to type 'mail' each time I log in to check. I was just trying to get the new mail message to appear on login...
If this parameter is set to a file name and the MAILPATH variable is not set, bash informs the user of the arrival of mail in the specified file.
Specifies how often (in seconds) bash checks for mail. The default is 60 seconds. When it is time to check for mail, the shell does so before displaying the primary prompt. If this variable is unset, or set to a value that is not a number greater than or equal to zero, the shell disables mail checking.
A colon-separated list of file names to be checked for mail. The message to be printed when mail arrives in a particular file may be specified by separating the file name from the message with a '?'. When used in the text of the message, $_ expands to the name of the current mailfile. Example:
MAILPATH='/var/mail/bfox?"You have mail":~/shell-mail?"$_ has mail!"'
Bash supplies a default value for this variable, but the location of the user mail files that it uses is system dependent (e.g., /var/mail/$USER).
I'm trying to get the system to check and tell me as soon as I log in.
MAILPATH tells it where to check
MAILCHECK tells it how often to check
These are already set correct:
[root@GDServer ~]# env | grep MAIL
What the system doesn't do is tell me when I log in.
As things are now:
login as: root
Last login: Wed May 9 19:57:18 2012 from 192.168.1.7
[root@GDServer ~]# mailx
Heirloom Mail version 12.5 7/5/10. Type ? for help.
"/var/spool/mail/root": 4 messages 2 new 3 unread
U 1 root Wed May 9 18:01 20/771
2 Cron Daemon Wed May 9 19:48 27/1188 "Cron <root@GDServer> "
>N 3 wdtv box Wed May 9 22:55 29/1012 "virus-scan.05-09-12"
N 4 root Thu May 10 06:01 29/1021 "virus-scan.05-10-12"
What I would like:
login as: root
Last login: Wed May 9 19:57:18 2012 from 192.168.1.7 You have new mail!