<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Chan Chen Coding...

    Redirect stderr To stdout

    Q. How do I redirect stderr to stdout? How do I redirect stderr to a file?

    A. Bash and other modern shell provides I/O redirection facility. There are 3 default standard files (standard streams) open:
    [a] stdin - Use to get input (keyboard) i.e. data going into a program.

    [b] stdout - Use to write information (screen)

    [c] stderr - Use to write error message (screen)

    Understanding I/O streams numbers

    The Unix / Linux standard I/O streams with numbers:

    HandleNameDescription
    0stdinStandard input
    1stdoutStandard output
    2stderrStandard error

    Redirecting the standard error stream to a file

    The following will redirect program error message to a file called error.log:
    $ program-name 2> error.log
    $ command1 2> error.log

    Redirecting the standard error (stderr) and stdout to file

    Use the following syntax:
    $ command-name &>file
    OR
    $ command > file-name 2>&1
    Another useful example:
    # find /usr/home -name .profile 2>&1 | more

    Redirect stderr to stdout

    Use the command as follows:
    $ command-name 2>&1



    -----------------------------------------------------
    Silence, the way to avoid many problems;
    Smile, the way to solve many problems;

    posted on 2012-05-18 07:40 Chan Chen 閱讀(382) 評論(0)  編輯  收藏 所屬分類: Linux

    主站蜘蛛池模板: 中文字幕精品亚洲无线码二区 | 久9久9精品免费观看| 亚洲国产精品专区| 黑人粗长大战亚洲女2021国产精品成人免费视频 | 久久影视综合亚洲| 91成人免费福利网站在线| 97在线视频免费公开观看| 亚洲va中文字幕无码久久| 免费无码作爱视频| 亚洲国产老鸭窝一区二区三区 | 亚洲国产日韩在线人成下载| av无码久久久久不卡免费网站 | 亚洲小说区图片区| 国产精品成人免费视频网站京东 | 无码欧精品亚洲日韩一区| 久久久久国产精品免费免费不卡| 久久精品国产精品亚洲色婷婷| 一级毛片免费播放| 亚洲一区二区三区国产精品无码| 精品一区二区三区免费视频| 免费精品国产自产拍在 | 人体大胆做受免费视频| 2022中文字字幕久亚洲| 最好免费观看高清在线 | 国产精品亚洲高清一区二区| 免费看黄的成人APP| 久久av无码专区亚洲av桃花岛| 97视频免费在线| 最新亚洲人成无码网站| 好看的电影网站亚洲一区| 99免费视频观看| 国产精品无码亚洲精品2021 | 亚洲AV成人潮喷综合网| 国产色无码精品视频免费| 亚洲最新黄色网址| 又爽又黄无遮挡高清免费视频| 亚洲无mate20pro麻豆| 亚洲成AⅤ人影院在线观看| 亚洲av无码专区青青草原| 日韩免费三级电影| a色毛片免费视频|