Linux Command To View File Content
Chapter:
Linux Commands
Last Updated:
25-10-2019 16:25:59 UTC
Program:
/* ............... START ............... */
root@kali:~/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
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.