So I'm running windows 7 and I have a long program that runs through command prompt and I need the output of it. I put my Buffer Size and Number of Buffers to 999 but I still am unable to get the entire history from when my program starts running. Suggestions on how maybe I can either print the history to a file or copy the whole thing?
Windows has something similar to the redirection operators in Linux.
The exact same syntax can be used:
progname > outputfile.txt
This will wipe the file of its old contents and fill it with the output of progname.
If you should need to append to the file (add more without wiping out the old contents), use the below syntax:
progname >> outputfile.txt
What you want is called "redirection", and can be done in any terminal/command prompt. Just use command_to_run > filename_to_save_into.
Also note that a double-arrow will append to a file, as in command_to_run >> filename_to_append_onto.
To send the output to the clipboard append | clip.
Ex: ping example.com | clip
From my clipboard:
Pinging example.com [18.104.22.168] with 32 bytes of data:
Reply from 22.214.171.124: bytes=32 time=70ms TTL=244
Reply from 126.96.36.199: bytes=32 time=103ms TTL=244
Reply from 188.8.131.52: bytes=32 time=16ms TTL=244
Reply from 184.108.40.206: bytes=32 time=19ms TTL=244
Ping statistics for 220.127.116.11:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 16ms, Maximum = 103ms, Average = 52ms
Besides redirection, you can also increase the buffer size of the command prompt. Details are explained here: http://technet.microsoft.com/en-us/library/bb491037.aspx
Open Command Prompt
Click the upper-left corner of the Command Prompt window, and then click Properties.
Click the Options tab.
In Command History, type or select 999 in Buffer Size, and then type or select 5 in Number of Buffers.
In Edit Options, select the Quick Edit Mode and Insert Mode check boxes.
Click the Layout tab.
In Screen Buffer Size, type or select 2500 in Height.
Do any of the following optional tasks:
In Screen Buffer Size, increase Width.
In Window Size, increase Height.
In Window Size, increase Width.
Clear the Let system position window check box, and then, in Window Position, change the values in Left and Top.
In the Apply Properties dialog box, click Save properties for future windows with same title.
In the Note section
By increasing the screen buffer size to 999, you enable scrolling through the Command Prompt window.
By increasing the number of buffers to five, you increase the number of lines in the Command Prompt window to 5000.
So I'm running windows 7 and I have a long program that runs through command prompt and I need the output of it. I put my Buffer Size and Number of Buffers to 999 but I still am unable to get the entire history from when my program starts running. Su
Is it possible to save DOS command prompt history to a file? I'm going to work in sqlplus and would like to save all commands that were used and executed in a log file. Example, I would like to save all DOS commads executed in a DOS session: C:\> sql
Possible Duplicate: How to copy text in the Windows command line 'cmd'? How to copy the commands typed in the command prompt onto a text editor or Word? As Ctrl + C doesn't work in the command prompt, how else can one achieve that? Would appreciate a
When I copy a file in command prompt, it occurs instantly. But when I copy a file inside Explorer of Windows 7, it waits around 3-10 seconds before starting the copying process. Also the icons of the files in Explorer appear very slowly. Maybe this i
Sometimes I'd like to get some command from history output, copy it to bash prompt, make some changes and run it. Is there a way to copy command from a history output to bash prompt without involving mouse? For example, it would be some script, than
I'm looking for a Command Prompt alternative that supports handy features of Linux Terminal, like Keeping history of Commands and accessing them using Up-Arrow key. Logging commands in the file (like: .bash_history). Ability to resize command window.
Anybody know of a quick way of copying a log file used by a Windows XP service either before the service starts (during boot) or after the service has stopped (during shutdown)? Preferably using the command prompt, but would consider any free tool to
Pressing F7 in the Windows command prompt window displays a console window with the command history (list of previous commands). How do I change the size of this command history window? For example, I might want to see more commands (increase height
I'm wanting to add the previous command's history number to my prompt, as well as the exit code. At present, %h[%?] Gives me the current history number, as well as the last exit code. What I'd really like is an expansion for %h-1, but I'm not sure if
Is it possible to copy multiple lines from the Windows Command Prompt without it inserting a new line where each line reaches the end of the terminal? For example, if I have the following line in the console: c:\very_long_path_here\more_path_here>com
My little brother keeps looking at violent games after I finish playing them. He is so smart but I need to get him to stop. How do I erase one or all items from history on my computer so that it doesn't show up on the command prompt? I have looked ev
attempting to copy program file notepad.exe from the \windows to the \tools directory using command prompt. Trying to complete simple tasks using command prompt, but still unable to grasp. have not found a set of instructions that clicks for me, very
Im using Centos 6.3 and have customised my .bash_profile with the following commands to help with history completion (and colorising the prompt): bind '"\e[A": history-search-backward' bind '"\e[B": history-search-forward' bind '"
Hi there i would like to know how to copy a file that is in, lets say /rootfolder/subfolder to the rootfolder --------------Solutions------------- Open the Command Prompt with administrative privilidges (they are needed for writing the file to C:\ ).
How can I copy a file from a pen drive to particular directory on the hard drive in windows 7 using command prompt in quickly compare to ordinary copy paste. Scenario 1: need to copy the files from particular directory which is present in pen drive t
I already know how to flush the history in command prompt, but I only want to delete one part of it. I'm not really an expert on command prompt; I only know a few commands, but I really want to learn more. So, I'd like for someone to post a few good
Where do I find the history for the gnome shell command prompt? I mean the one that is normally started with Alt+F2. I'm running GNOME Shell v3.10.4. Or alternatively: how can I delete it? --------------Solutions------------- This command will do: gs
Given a very long single command at the command line in Windows, I'd like to simply copy that command into clipboard. I am just looking for the ubiquitous Shift-End , Ctrl-C type functionality almost all editors have. I DON'T want to use Mark (yes, e
I want to copy all files of a certain type (like .docx, .pdf, etc) on my PC into a folder. How can I do that? --------------Solutions------------- Run this command to copy all PDF files from the C drive and subdirectories to C:\allPDF folder. C:\>for