- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: at command stop mail
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2002 06:08 PM
03-28-2002 06:08 PM
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xf06b7e990647d4118fee0090279cd0f9,00.html
and I still get mail from root.
Command -
at -f file_name now >2&1 >/dev/null
The command is executed from with a non root user's script.
I have no need for the mail since I capture errors else where.
I guess I need another set of eyes because even directing the output to a file results in an email sent.
Thanks for any input.
dl
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2002 06:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2002 06:24 PM
03-28-2002 06:24 PM
Re: at command stop mail
Looks like a typo.
You should be doing this:
at -f file_name now 2>&1 >/dev/null
not this:
at -f file_name now >2&1 >/dev/null
Better still, I prefer to use:
at -f file_name now 1>/dev/null 2>/dev/null
No ambiguity, no confusion.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2002 06:42 PM
03-28-2002 06:42 PM
Re: at command stop mail
I'm not at a system to try this now but let's assume >2&1 was simply a typo you made when posting your question.
There's a difference between the following two command lines:
command >/dev/null 2>&1
command 2>&1 >/dev/null
The first command line redirects stdout to /dev/null then redirects stderr to where ever stdout is going (which was just set to /dev/null). So stdout and stderr get sent to /dev/null.
The second command line redirects stderr to where ever stdout is going at the time (by default the at job sends stdout to mail) then redirects stdout to /dev/null. Only stdout is redirected to /dev/null. Stderr was not affected by the redirect of stdout.
"man sh-posix" has more info I believe).
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2002 07:22 PM
03-28-2002 07:22 PM
Re: at command stop mail
For this reason, I'm a strong supporter of the syntax

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2002 08:53 AM
03-29-2002 08:53 AM
Re: at command stop mail
Each scenario appears to work.
Yes I did send a typo, but I tried so many combinations, I no longer could see the forest.
Part of my problem was the user id I was using to test.
I have set nearly all my users
in a mail db to redirect the mail to Outlook Express. This appeared to continue to send the mail regardless of the suggested method of executing the redirection.
The user that will need to execute this command is not in that db and no mail or mail error seems to appear for the user or in root.
In any event, thanks to all that replied to my frustration.
dl