Welcome to the Linux Foundation Forum!

display contents of a file


can we use echo command for displaying the contents of a particular file....................


  • woboyle
    woboyle Posts: 501
    The echo command does just that - echo what you type to the terminal. To display (browse) the contents of a file, use the less command. IE: less filename
    Note that this only works for text files. For binary files, you need an application that can render them correctly.
  • raluxs
    raluxs Posts: 20
    less let you browse a file one page at the time ans lets you scroll up and down the file.

    If you just want to display the file contents use the command cat



Upcoming Training