cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
255
Views
0
Helpful
7
Replies

Edit internal files

A3XN
Level 1
Level 1

Text files placed inside a router (or switch) can be edited from IOS?

Does command "vi" exist?

Thanks for the information

7 Replies 7

RedNectar
VIP Alumni
VIP Alumni

Hi @A3XN ,

Interesting question - but you put on the forum that discussed Community related issues. You'll probably get a much better response on https://community.cisco.com/t5/switching/bd-p/6016-discussions-lan-switching-routing

In the meantime, I can tell that that vi exists on Nexus 9000 switches in ACI mode (but you can't edit any config on Nexus 9000 switches in ACI mode)
But as for other switches/routers - I can't tell. I don't think so

RedNectar aka Chris Welsh.
Forum Tips: 1. Paste images inline - don't attach. 2. Always mark helpful and correct answers, it helps others find what they need.

Thank you

pieterh
VIP
VIP

I doubt if "vi" is available in Cisco IOS, if any editor present it may be the line mode editor "ed"
best luck is to copy the file to a (t)ftp server, edit there and copy back

normal commands can be found using the "?" on the command prompt
so try "?"or  "vi?",  but i very much doubt this will give result on your system
there are a number of "hidden commands , but i doubt vi will fall among those.
on some devices you can access a host shell for some unixlike commands, but this is intended for use by Cico TAC engineer.

 

Double work must be done

can you be more specific what you need to edit using vi ?

many network engineers can maintan their network configuration using the command-line options that are avaiable in the Cisco network equipment
- recall a previously entered command
- using "no <cmd>" command  to negate/remove the command
- recall the command again and edit the command within the command line
there are many "hot-keys" to speed up this editing 
https://www.cisco.com/c/en/us/td/docs/wireless/controller/8-5/cmd-ref/b-cr85/using_the_command_line_interface.pdf 

repetitive commands like ACL lines or multiple route statements, can easily enough entered this way
some specific commands like ACL's use line-numbers within the ACL to pont at a specific entry
you can modify this ACL-line by specifying number when deleting and re-entering a modified entry (as described above)

 

Joseph W. Doherty
Hall of Fame
Hall of Fame

@A3XN wrote:

Text files placed inside a router (or switch) can be edited from IOS?

Does command "vi" exist?

Thanks for the information


From IOS, directly, I don't believe so.

From platforms that support a Linux guest shell, very likely, although where the text files are stored, might not meet your requirements.  For example, I don't know whether you could access the startup config file.  However, editing python script, using vi, on Cisco devices, is mentioned as possible in Internet material.

Suggest you search for cisco and guestshell for additional information.