linux

Linux Manipulating




From the shell's point of view, there are three kinds of information in linux:

  • standard input
  • standard output
  • standard error



  • Standard input is the information that a user enters from the keyboard for the linux shell to use, such as commands and filenames.

    Standard output is essentially the information shell prints on the screen after evaluating a user's commands.

    Standard error is the information that indicates that something has gone wrong.

    Pipes
    A pipe is the ( | ) symbol. It is used to connect the standard output of one command to the standard input of another command. Essentially, it allows a user to string commands together.

    eg: cat  filename | less

    Using Redirection
    Redirection means changing where standard input comes from or where the standard output goes.
    For redirection the symbol used in Linux is ">".Placing ">" after the any command utility then it redirects its output to the file name following the symbol.

    eg: cat  filename > newfile (the "newfile" will save the output of the file "filename")

    Appending Standard Output
    The symbol >> appends standard output. This means it adds the standard output to the end of a file, rather than over-writing the file.
    eg:less  filename >> newfile (the "newfile" will be appended with the out put of "filename")

    Comparing two files
    To compare two files such as "actual file" and the "modified file" of the actual one,and to find out the difference between the two files the "diff" command is used. "diff" compares text files line-by-line and reports the differences to standard output.
    eg:   diff  file1  file2


                               send to a friend                                            moby@mylinuxplanet.com      

    Please free to mail your queries and feed back at moby@mylinuxplanet.com a free linux tutorial website


    Linux Tutorials

    About This Site

    History of Linux

    Open Source

    File system terms

    Linux File System

    History of Shell

    Opening a Shell Prompt

    Shell Prompt Basics

    Linux Shell Prompt

    Linux Commands

    Viewing Text Files From The Shell

    Manipulating Information from Shell

    Linux Help

    Managing Linux Files

    Multiple Commands Usage

    Managing Linux Directories

    Linux Directory Commands

    Locating And Search Commands

    Command History

    Wildcard Characters

    Creating a Linux User

    Ownership And Permissions

    File Compression

    Virtual Console Logout & Shutdown

    Running Background Process

    Shell Prompt Keyshortcuts

    Clearing And Resseting Terminal

    Vi Editor

    Shell Scripting

    Installing and Removing Applications

    Servers in Linux

    Our Link Partners