<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) 評(píng)論(0)  編輯  收藏 所屬分類: Linux

    主站蜘蛛池模板: 男女超爽刺激视频免费播放| 中文字幕亚洲综合小综合在线| 本免费AV无码专区一区| 麻豆亚洲AV成人无码久久精品 | 免费鲁丝片一级观看| 1000部禁片黄的免费看| 人妻丰满熟妇无码区免费| 一级毛片aaaaaa免费看| 亚洲视频在线观看免费| 最近中文字幕电影大全免费版 | 搡女人免费免费视频观看| a毛片在线免费观看| 你是我的城池营垒免费看| 东方aⅴ免费观看久久av| a级毛片无码免费真人久久| 嫩草在线视频www免费看| 小日子的在线观看免费| 2021在线永久免费视频| 色se01短视频永久免费| 好爽…又高潮了毛片免费看| 日韩视频在线免费观看| 免费在线视频一区| 亚洲色成人中文字幕网站| 亚洲成a人片77777老司机| 亚洲影院在线观看| 国产成人精品日本亚洲18图| 亚洲爆乳少妇无码激情| 一级白嫩美女毛片免费| 18禁超污无遮挡无码免费网站 | 99亚洲男女激情在线观看| 人人爽人人爽人人片av免费| 中国videos性高清免费| 久久精品视频免费播放| 久久国内免费视频| 免费一级毛片女人图片| 国产V亚洲V天堂A无码| 亚洲国产美女精品久久| 亚洲美国产亚洲AV| j8又粗又长又硬又爽免费视频| 久久爰www免费人成| 最近中文字幕无免费视频|