LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 10-26-2010, 12:35 AM   #1
ben1173
LQ Newbie
 
Registered: Sep 2010
Posts: 8

Rep: Reputation: 0
Listing all users who currently have mail in inbox


Hi,

How can I make a sorted list of all users on my local machine who currently have mail in their 'Inboxes' (i.e., their spool of delivered but not yet read email). I also need to include "system" users and list one user per line.
Please help...I'm pooling my hair....

Thank you
 
Old 10-26-2010, 12:55 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Since hair-pooling sounds unattractive ... :}

Code:
cd /var/spool/mail; for i in *; do if [ -s $i ]; then echo $i;fi; done
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix Mail Server: cant deliver mail in Users Inbox madfed Linux - Server 1 06-14-2009 06:08 AM
Squirrel Mail is not sending mail in INBOX MajazKhan Linux - Server 1 04-08-2007 07:57 AM
Sendmail Not Show Mail in Inbox (Evalution Mail) skanand Linux - Networking 1 05-11-2005 01:22 AM
Postfix $HOME/mail/inbox instead of /var/spool/mail ramram29 Linux - Software 3 08-08-2004 02:28 AM
can mozilla and outlook use the same mail inbox breadbin Linux - Software 2 11-27-2002 03:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration