<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

    主站蜘蛛池模板: 午夜a级成人免费毛片| 99久久人妻精品免费二区| 国产免费怕怕免费视频观看| 亚洲激情视频图片| 99视频全部免费精品全部四虎| 亚洲视频一区网站| 91九色视频无限观看免费| 亚洲人成综合在线播放| 97视频免费在线| 亚洲欧美日韩久久精品| 国产男女猛烈无遮挡免费视频网站| 色窝窝亚洲av网| 中文字幕亚洲不卡在线亚瑟| 三级网站免费观看| 337p日本欧洲亚洲大胆色噜噜| 久久精品毛片免费观看| 亚洲人成电影院在线观看| 日本久久久免费高清| 四虎永久在线精品免费一区二区| 久久精品国产亚洲5555| 久久99热精品免费观看牛牛| 亚洲国产成人精品无码区在线秒播 | 区久久AAA片69亚洲| 91福利免费网站在线观看| 亚洲精品国产成人99久久| 91免费资源网站入口| 国产偷国产偷亚洲高清在线| 亚洲精品国产高清不卡在线 | 最近中文字幕mv免费高清视频8 | 麻豆安全免费网址入口| 九月丁香婷婷亚洲综合色| 59pao成国产成视频永久免费| 亚洲AV永久无码精品网站在线观看| 亚洲国产一区二区三区| 一级毛片免费毛片一级毛片免费| 亚洲第一成人在线| 国产国拍亚洲精品福利| 91精品免费在线观看| jizz免费在线影视观看网站| 亚洲大尺码专区影院| 亚洲一区无码精品色|