How do I display a text file content in CMD? – Dev

The best answers to the question “How do I display a text file content in CMD?” in the category Dev.

QUESTION:

I want to display the content of a text file in a CMD window. In addition, I want to see the new lines that added to file, like tail -f command in Unix.

ANSWER:

We can use the ‘type’ command to see file contents in cmd.

Example –

type abc.txt

More information can be found HERE.

ANSWER:

You can use the more command. For example:

more filename.txt

Take a look at GNU utilities for Win32 or download it:

ANSWER:

You can use the ‘more’ command to see the content of the file:

more filename.txt

ANSWER:

I don’t think there is a built-in function for that

xxxx.txt > con

This opens the files in the default text editor in windows…

type xxxx.txt

This displays the file in the current window. Maybe this has params you can use…

There is a similar question here: CMD.EXE batch script to display last 10 lines from a txt file
So there is a “more” command to display a file from the given line, or you can use the GNU Utilities for Win32 what bryanph suggested in his link.