Previous Year Question Papers Subject wise Lessons Solved Assignments Download Free E-books


    Input-Output redirection

    Share
    avatar
    Admin
    Admin

    Posts : 13
    Join date : 2009-11-12

    Input-Output redirection

    Post  Admin on Mon Nov 16, 2009 10:38 am

    Mostly all command gives output on screen or take input from keyboard but in UNIX/LINUX it possible to send output to file or to read input from file. For e.g. $ls command gives output to screen; to send output to file of ls command, $ls>filename

    It means put output of ls command to filename. There are 3 main redirection symbols >,>>,<

    >
    Syntax: command>filename
    To output command result to file.
    Note: that if file already exist, it will be overwritten else new file is created
    Ex: $ls>myfile

      Current date/time is Thu Oct 19, 2017 2:10 pm