Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7829055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T10:35:58+00:00 2026-06-02T10:35:58+00:00

I am trying to hide stdout & stderr from displaying and can’t get the

  • 0

I am trying to hide stdout & stderr from displaying and can’t get the syntax right.

I have a one liner in root’s .profile to email me whenever there is a root login:

netstat -antp | grep ESTABLISHED | grep -v 127.0.0.1 | mail -s "alert: root access on server" email@address.com 2>&1>/dev/null &

The problem is that after the mail is sent, I get this on stdout:

[1]+  Done  mail -s "alert: root access on server" email@address.com 2>&1 > /dev/null

I don’t want it to show anything when on the command line when the mail is sent, what am I missing? I also tried this, but no luck:

mail -s "alert: root access on server" email@address.com > /dev/null 2>&1 &

I have to have the “&” at the end or it pauses ~30 seconds before login.

Any ideas on how to send the email, hide the stdout and stderr, and run it as a background program?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T10:36:06+00:00Added an answer on June 2, 2026 at 10:36 am

    (netstat -antp | grep ESTABLISHED | grep -v 127.0.0.1 | mail -s “alert: root access on server” email@address.com &)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to hide window after its startup. I have own window-class which is
I'm trying to hide actual sub-directory from url path using mod_rewrite. The folder actual
I'm trying to hide some of my Perl program from the end user to
I'm trying to hide the iPad keyboard from a modal view controller but it
I'm trying to hide the Server header returned by Apache on every request, from
I'm trying to hide an img tag so that I can later display it
Im trying to hide some admin specific buttons on my masterpage from users with
im trying to hide inserted rows into a table that have the class newrow.
I am trying to hide a row which contains in one of the cells
I'm trying to hide some embedded flash objects without disabling them. Right now I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.