Linux Command To View File Content

Chapter: Linux Commands Last Updated: 25-10-2019 16:25:59 UTC

Program:

            /* ............... START ............... */
                

[email protected]:~/Desktop# cat myFile.txt  /* below showing the contents of file myFile.txt */

This is my text file content.
This is the content written in file .

                /* ............... END ............... */
        

Output


            Linux Command To View File Content
        

Notes:

  • There are two commands to view the content of the file, they are $cat and $less.
  • Commonly used command in linux to view the content of file is $cat.
  • cat Syntax : $cat [OPTION] [FILE]...
  • less Syntax : $less filename
  • Cat command helps us to create, view, concatenate files. When you type cat command it will read the file content and provide the output in terminal.
  • To view more about the command and parameter you can use man command to get the manual.
Similar Programs Chapter Last Updated
Linux Version Command Linux Commands 01-12-2020
Unzip Command In Linux Linux Commands 20-11-2019
Process Command In Linux Linux Commands 16-11-2019
Linux Command To Create Link Linux Commands 15-11-2019
Linux Command To Check OS Version Linux Commands 25-10-2019
Netstat Command In Linux Linux Commands 13-08-2019
Telnet Command In Linux Linux Commands 13-08-2019
Linux Command To Create A File Linux Commands 23-05-2019
Linux echo Command Linux Commands 05-05-2018
Linux Ping Command Linux Commands 05-05-2018
Linux ls (List Directory) Command Linux Commands 17-03-2018

1