Create and View file in linux

Create and View file in linux

The ‘cat’ command is used to display text files. It can also be used for copying, combining and creating new text files.  Let’s see how it works.

To create a new file, use the command

  • vi filename
  • Press a to enter into insert mode or append mode
  • Start writing into to file
  • To Save file, Press ESC and wq!


To view a file, use the command –

cat filename

or vi filename



For any query or issue, feel free to discuss on