Reading files

Reading files in the terminal uses dedicated commands: cat displays a whole file, head and tail show the start and end, less lets you browse page by page, and wc counts lines, words or bytes. tail -f follows a growing file, handy for logs.

Example

head -n 5 data.csv
tail -f app.log

Related concepts

The whole glossary