Viewing the Contents of Text Files

To see a text file at once use: cat

To see a text file one screen at a time use: less

Examples:
cat list.txt
cat *.txt
less long_file

These commands only work properly with plain text files! For images and documents created by programs like Word, Excel, etc. you have to some other application to see them. In most cases giving the filename as an argument to the open command will open the file in an appropriate application.

Tasks:

Tips:


Previous - File Compression and Archiving

Next - Searching for Text Inside Files

Home