Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to print first 5 lines of the file in windows cmd

How can I print first 5 lines of the file in windows CMD?

There is a problem that I can't use PowerShell (spicific task) and batch scripts. Can you help me with this?

like image 860
Jade Avatar asked Sep 15 '25 05:09

Jade


1 Answers

You should be able to use the more command in some regard.

Maybe "more filename P 5"

see http://support.microsoft.com/kb/227449

like image 85
tuxy117 Avatar answered Sep 17 '25 20:09

tuxy117