<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

    主站蜘蛛池模板: 国产99久久久久久免费看| 中文日韩亚洲欧美制服| 日本一区二区在线免费观看| 大地资源在线观看免费高清| 亚洲剧场午夜在线观看| 免免费国产AAAAA片| 精品久久亚洲中文无码| 无码高潮少妇毛多水多水免费| 亚洲1区1区3区4区产品乱码芒果| 中国在线观看免费国语版| 亚洲中文字幕无码av永久| 国产区卡一卡二卡三乱码免费| 看一级毛片免费观看视频| 国产精品亚洲综合一区| 美女被cao网站免费看在线看| 久久久久亚洲精品成人网小说| 亚洲成年人免费网站| 亚洲欧洲日韩国产一区二区三区| 成人免费淫片在线费观看| 在线观看亚洲视频| 日韩一卡2卡3卡4卡新区亚洲| 久久综合九色综合97免费下载| 亚洲视频日韩视频| 成人免费淫片在线费观看| 日日摸夜夜添夜夜免费视频| 亚洲AV无码专区电影在线观看| 18禁网站免费无遮挡无码中文 | 人禽伦免费交视频播放| 亚洲人成色777777在线观看| 最近免费中文字幕大全免费| 亚洲色少妇熟女11p| 国产aⅴ无码专区亚洲av麻豆 | 国产麻豆一精品一AV一免费| 亚洲成aⅴ人片在线影院八| 国产片免费在线观看| a级黄色毛片免费播放视频| 亚洲av无码片区一区二区三区| 免费va人成视频网站全| 性xxxxx大片免费视频| 亚洲av无码av在线播放| 久久青青草原亚洲av无码app|