How to Read a File Line by Line
One useful feature of Linux operating systems is the ability to parse information from a Command Line Interface (CLI). For instance, using the "cat" program lets you read any file you have permission to access. Whether it's in legible text depends on the type of file it is. The program, however, outputs all of the data onto your screen, so files longer than one page are truncated. You'll need to use the "more" program to parse the data from "cat," which you can display line by line.
Instructions
-
-
1
Open an instance of console if you're using a Graphical User Interface (GUI).
-
2
Navigate to the directory with the file you need using the "cd" command.
-
-
3
Type "cat filename | more -1" and press "Enter." Type the name of the file in place of "filename." The file will display line by line every time you press "Enter" or the space bar. If you wish to stop viewing the file before reaching its end, press "Q" to stop.
-
1