display contents of a file

Link to this post 09 Jul 09

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

Link to this post 09 Jul 09

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.

Link to this post 09 Jul 09

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


Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board