<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 閱讀(390) 評論(0)  編輯  收藏 所屬分類: Linux

    主站蜘蛛池模板: 99久久久国产精品免费蜜臀| 免费视频成人国产精品网站| 亚洲欧洲日韩国产综合在线二区| 激情婷婷成人亚洲综合| fc2成年免费共享视频18| 可以免费观看一级毛片黄a| 亚洲熟女少妇一区二区| 亚洲人成电影在线天堂| 日本在线免费观看| 久久精品国产亚洲av水果派| 7777久久亚洲中文字幕| 日韩在线视精品在亚洲| 国产成人免费ā片在线观看| 国产精品亚洲精品日韩动图| 四虎永久成人免费| 国产成人1024精品免费| 国产亚洲真人做受在线观看| 日韩精品无码专区免费播放| 亚洲国产成人资源在线软件 | 最好免费观看韩国+日本| 中文字幕亚洲综合久久综合| 中文字幕看片在线a免费| 无码av免费毛片一区二区| 亚洲永久网址在线观看| 免费国产在线观看不卡| 国产一二三四区乱码免费| 亚洲精品无码久久毛片波多野吉衣 | 国产福利免费在线观看| 理论片在线观看免费| 好先生在线观看免费播放| 久久人午夜亚洲精品无码区| 亚洲日本一区二区三区在线不卡| 永久在线观看免费视频| 亚洲理论在线观看| 国产一精品一aⅴ一免费| 两性色午夜免费视频| 亚洲国产精品综合久久20| 亚洲人成无码网WWW| h视频在线免费看| 国产亚洲婷婷香蕉久久精品| 97免费人妻无码视频|