Nohup:redirecting stderr to Stdout_nohup:

Source: Internet
Author: User

Nohup:redirecting stderr to stdout

Turn from: https://blog.csdn.net/educast/article/details/28273301

found that the original good nohup information output to the function of the specified file, suddenly a problem. The phenomenon is the output of the console output to the file I specified, the other part of the output to the nohup.out, and I do not want it to produce nohup.out files, do not know what the reason.

Nohup bin/startmanagedserver.sh myserver htp://192.168.0.1-xms2048m-xmx2048m > Logs/myserver.out & now refers to the line of command, will give me two files, one logs/myserver.out, and the other Nohup.out file.
How to make it not produce nohup.out files.
Online search for a long time, it is said to be able to change the back of the "&" to "2>&1 &", so the start command changed to the following:

Nohup bin/startmanagedserver.sh myserver htp://192.168.0.1-xms2048m-xmx2048m > Logs/myserver.out 2>&1 & Execute again, problem solved.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.