cmd.exe output too long

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
biagiorea
Posts: 2
Joined: 09 Jan 2014 07:38

cmd.exe output too long

#1 Post by biagiorea » 09 Jan 2014 07:57

hi this is my 1st post in dostips.com/forum, yahoo

mysqldbcompare.exe is a mysql utility
you can run mysqldbcompare on win cmd.exe
eg
C:\Program Files (x86)\MySQL\MySQL Utilities>mysqldbcompare --server1=root@localhost db_vtigercrm60_01:db_vtigercrm60_01copy --difftype=sql --run-all-tests

<mysqldbcompare output>

but if mysqldbcompare output is too long, I can read only the last part, instead the first part of the output is no longer visible,
how can I do to display the full output ?
maybe cmd.exe can set to increase buffer to display long output?
maybe into a .bat file I can run mysqldbcompare and put the output into a log file?
thanks for replies

ps my related post in mysql.forum
http://forums.mysql.com/read.php?144,60 ... msg-603327
Last edited by biagiorea on 09 Jan 2014 08:06, edited 1 time in total.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: cmd.exe output too long

#2 Post by foxidrive » 09 Jan 2014 08:04

biagiorea wrote:but if mysqldbcompare output is too long, I can read only the last part, instead the first part of the output is no longer visible,
maybe with a .bat file I can direct mysqldbcompare output to a log file?


Yes, you can do that. This is how to do it in a batch file.

Code: Select all

>file.log "c:\folder\command.exe" parameters


The >file.log can be placed at the end of the line, when the last item is not a numeral or contains a numeral. Placing it at the start is better in this respect.

To append information to a log then use >> instead of just >

biagiorea
Posts: 2
Joined: 09 Jan 2014 07:38

Re: cmd.exe output too long

#3 Post by biagiorea » 09 Jan 2014 09:30

thanks for the reply foxidrive
greeeeat it works fine

newoslands
Posts: 1
Joined: 27 Sep 2017 14:29

Re: cmd.exe output too long

#4 Post by newoslands » 27 Sep 2017 14:37

You can also "pipe" the command to more.
For example, the command

Code: Select all

ipconfig /all
outputs more than a single page of output. Piping to more makes it display one page at a time. This command piped to more would look like this:

Code: Select all

ipconfig /all| more

The line is made by pressing shift+backslash (shft+\)

Post Reply