Solved

mail command

Posted on 2014-02-06
5
382 Views
Last Modified: 2014-02-25
I am new to mail command and I need help with mail command.

I did setup a cron job to run everyday.  When I tried to run mail command its shows
"/var/spool/mail/root": 2445 messages 2368 unread

How do i use this command to search better

I would really appreciate if someone can share the information.
0
Comment
Question by:ittechlab
  • 2
  • 2
5 Comments
 
LVL 23

Expert Comment

by:savone
ID: 39839593
Can you show us the command you are running?

What exactly are you trying to do?
0
 

Author Comment

by:ittechlab
ID: 39839995
actually when i run mail command i see a list but if i want to see more what is the command
0
 

Author Comment

by:ittechlab
ID: 39839997
how do i see more list
0
 
LVL 23

Expert Comment

by:savone
ID: 39840755
Try the + and - signs
0
 
LVL 5

Accepted Solution

by:
Dave Gould earned 310 total points
ID: 39847744
Once you've read your mails, you might want to avoid them in the first place!
You are probably getting them from the cron jobs as you do not redirect the output.
ie use something like this in your crontab:

10 * * * * your_script > log_file 2>&1
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now