How do you redirect an output to a local file when executing a cisco command?
Let's say I would like to execute "show interface description | inc mcRNC411" and I would like to redirect its output in a local file named C:\output.txt.
Thank you. :)
migrated from stackoverflow.com Sep 21 '12 at 16:13
This question came from our site for professional and enthusiast programmers.
This depends on the OS the devices is running (IOX, NX-OS etc) and the version it is on.
For a typical IOS device the details are here.
Although not all devices support using two pipes, and/or the
To have the update sent to your local computer as C:\output.txt is only possible, when using just the built in features on the switch, via URL redirection. The
This can also be TFTP
Since you are on Windows (I assume, with the mention of "C:\"), if you are using Hyperterminal you can capture the output of commands to a local file: See this reference.
I can't advise you on all terminal emulation programs there are too many, but there are multiple that have this same "capture to file" feature.
Last but not least, a simply copy and paste would surely do? ;)
Can you just log the session? Every terminal emulator I've used in... well, since I can remember offers the option to log all your session input and output to a file on the machine you're running it from.
Generally, on Windows (which you seem to be using) you can also select and copy the contents of a terminal or CLI window by right clicking on the title/menu bar and selecting the appropriate option from the context menu as well.
It's as simple as below:
You login to your router or switch. In the # mode, you type the following command
10.0.0.4 is your tftp server(hope you have one. If not just download solarwind tftp application and install it on any of your server. Just configure it to show the where the files to be stored by default)
routerbackup is your file name.
That's all :) Enjoy Cisco