18
4
How can I print the content of a textfile on the command prompt in Windows?
In Linux I can do this with less textfile.txt
, more textfile.txt
or cat textfile.txt
What is the command for this in Windows?
18
4
How can I print the content of a textfile on the command prompt in Windows?
In Linux I can do this with less textfile.txt
, more textfile.txt
or cat textfile.txt
What is the command for this in Windows?
27
type textfile.txt
If you want it page-by-page, more textfile.txt
.
2
For printing the content of multiple files (e.g. textfile_1.txt, textfile_2.txt) the following, does also works :
type textfile*
@Joey, Why do you say that
type
is useless? It's very useful for piping isn't it? – Pacerier – 2015-03-20T07:33:10.773@Pacerier, you can redirect input from a file in a shell as well. And most programs dealing with stdin also have a way of dealing with files, e.g.
findstr
/grep
, etc. – Joey – 2015-03-20T09:00:27.757@Joey, But it's more standard to use only stdin and stdout and ignore the file arguments. – Pacerier – 2015-03-23T08:07:51.353
6Or just
more textfile.txt
... avoids a useless use oftype
– Joey – 2010-07-13T01:06:09.377@Joey: Point taken. – Hello71 – 2011-07-20T19:43:30.237
1That was one hell of a lag ;) – Joey – 2011-07-20T21:15:31.407
@Joey: Just a year or so. About 31,536,000,000 ms latency. – Hello71 – 2011-07-20T21:32:46.033