How to view file content in linux


View the content of the cmdhelp.txt file in Linux, and display all content line numbers


cat -n cmdhelp.txt


cat : Concatenate FILE(s) to standard output.
-n, --number : number all output lines


     1  a
     2  b
     3  c
     4  d
Was this helpful?

I hope to help every developer quickly find the commands they need. Of course, you can also add your own commonly used commands for easy searching.