about summary refs log tree commit diff stats
path: root/wikipages/unixprotips.wiki
blob: 6d9e9a0306614e524d78e8fefde9fb6dad875e56 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!--
    author: xvetrd
    title: Unix ProTips
    description:
-->

<h2>UNIX ProTips</h2>
<p>I realized today I wasn't getting mail notifications, and I hadn't
set them up on this shell. So here are some things I do on my
local machine that work here:</p>
<p>To get the shell to tell you when you have new mail, after command
executions, add this to your <code>.profile</code></p>

<p><code>export MAILCHECK=0</code></p>

<p>And, if you want, you can have a persistent notification when you
have un-incorporated mail, or more specifically, when your
<code>/var/mail/&lt;username&gt;</code> isn't empty.</p>

<p><code>PS1="\$([-s /var/mail/`whoami` ] && echo '* ')$PS1"</code></p>

<p>This works in /bin/ksh, I can't speak for other shells.</p>

<p>If anybody else has some quick tips they would like to share, I
encorage them to edit this page.</p>

<p>Happy Unixing!</p>

<a href="/wiki">Back to Wiki</a>