Reading files
The cat command
Shows the whole content of a file. It also joins several on screen.
Syntax
cat [archivo]...Most useful options
-AShows the invisible charactersCopy-ready examples
$ cat Documentos/tareas.txtRead a file$ cat Documentos/tareas.txt Documentos/apuntes.txtTwo files in a row$ cat Documentos/notas.mdA third fileYou can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- With long files it floods the screen: use less for that.
FAQ
Does cat work for huge files?
It works, but it is uncomfortable: use less to read calmly.
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course