If you are studying for CCNA or CCNP, knowing how to use the Cisco IOS more command may help you in your studies, especially when you need to verify that you have successfully backed up or restored a Cisco IOS image or a router/switch configuration file.
The more command helps display the contents of binary/text files and search within text files.
In the next sections, I will be using the following network diagram.
Using The more Command to View File Content
The more command allows you to display a file’s content whether the file is locally stored on the router/switch or remotely stored on a network server like an FTP or TFTP server.
To view the contents of a file, issue the more url command in privileged EXEC mode, where url is the file’s URL. A URL consists of two main parts: a file-system prefix (ftp://, tftp://, nvram:…), and the complete path of the file within the current file system.
For example, in the URL system:running-config, system: is the file system prefix and running-config is the full path of the running configuration file.
The URL ftp://cisco:cisco123@10.0.0.100/devices/routers/R1/config/R1-config.cfg consists of the string ftp://, which indicates that the current file is stored on an FTP server, and the string cisco:cisco123@10.0.0.100/devices/routers/R1/config/R1-config.cfg tells where the file is located and the user credentials to connect to the FTP server.
10.0.0.100 is the FTP server’s IP address. The string /devices/routers/R1/config/R1-config.cfg is the complete path of the file R1-config.cfg on the FTP server. Finally, cisco and cisco123 are the username and password that the more command will use during the FTP authentication process.
Note that a URL may include a UDP/TCP port following the IP address field.
This example displays the startup configuration file using the more nvram:startup-config command, similar to the show startup-config command.
R1# more nvram:startup-config
!
!
!
! Last configuration change at 17:27:27 UTC Thu Jul 13 2023
!
upgrade fpd auto
version 15.0
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
!
!
ip source-route
The startup configuration file is either stored in NVRAM or a particular location specified by the CONFIG_FILE environment variable.
This example displays the running configuration file using the more system:running-config command.
R1# more system:running-config
!
! Last configuration change at 17:07:34 UTC Sun Jul 16 2023
!
upgrade fpd auto
version 15.0
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
!
!
ip source-route
no ip icmp rate-limit unreachable
ip cef
!
You can specify in the more command the format in which you want to display the file using the syntax: more [/ascii | /binary | /ebcdic] url. Here are the descriptions of the file formats supported by the command.
- /ascii: displays the file line by line using the ASCII encoding system. Cisco IOS converts every 8 bits into the corresponding character using the ASCII encoding system, as shown in this example.
R1# more /ascii ftp://cisco:cisco@10.0.0.100/R1-config.cfg 00000000: 76657273 696F6E20 31352E30 0D0A7365 vers ion 15.0 ..se 00000010: 72766963 65207469 6D657374 616D7073 rvic e ti mest amps 00000020: 20646562 75672064 61746574 696D6520 deb ug d atet ime 00000030: 6D736563 0D0A7365 72766963 65207469 msec ..se rvic e ti 00000040: 6D657374 616D7073 206C6F67 20646174 mest amps log dat 00000050: 6574696D 65206D73 65630D0A 6E6F2073 etim e ms ec.. no s 00000060: 65727669 63652070 61737377 6F72642D ervi ce p assw ord- 00000070: 656E6372 79707469 6F6E0D0A 210D0A68 encr ypti on.. !..h omitted output
- /binary: displays every 64 bits (16 characters) in both hexadecimal and ASCII formats, as shown in the following example.
R1# more /binary ftp://cisco:cisco@10.0.0.100/R1-config.cfg 00000000: 76657273 696F6E20 31352E30 0D0A7365 vers ion 15.0 ..se 00000010: 72766963 65207469 6D657374 616D7073 rvic e ti mest amps 00000020: 20646562 75672064 61746574 696D6520 deb ug d atet ime 00000030: 6D736563 0D0A7365 72766963 65207469 msec ..se rvic e ti 00000040: 6D657374 616D7073 206C6F67 20646174 mest amps log dat 00000050: 6574696D 65206D73 65630D0A 6E6F2073 etim e ms ec.. no s 00000060: 65727669 63652070 61737377 6F72642D ervi ce p assw ord- 00000070: 656E6372 79707469 6F6E0D0A 210D0A68 encr ypti on.. !..h 00000080: 6F73746E 616D6520 52310D0A 210D0A62 ostn ame R1.. !..b 00000090: 6F6F742D 73746172 742D6D61 726B6572 oot- star t-ma rker 000000A0: 0D0A626F 6F742D65 6E642D6D 61726B65 ..bo ot-e nd-m arke omitted output
- /ebcdic: display every 64 bits (16 characters) in EBCDIC format, as shown in this example.
R1# more /ebcdic ftp://cisco:cisco@10.0.0.100/R1-config.cfg 00000000: 76657273 696F6E20 31352E30 0D0A7365 .... .?>. .... .... 00000010: 72766963 65207469 6D657374 616D7073 .... .... _... /_.. 00000020: 20646562 75672064 61746574 696D6520 .... .... /... ._.. 00000030: 6D736563 0D0A7365 72766963 65207469 _... .... .... .... 00000040: 6D657374 616D7073 206C6F67 20646174 _... /_.. .%?. ../. 00000050: 6574696D 65206D73 65630D0A 6E6F2073 ..._ .._. .... >?.. 00000060: 65727669 63652070 61737377 6F72642D .... .... /... ?... 00000070: 656E6372 79707469 6F6E0D0A 210D0A68 .>.. `... ?>.. .... 00000080: 6F73746E 616D6520 52310D0A 210D0A62 ?..> /_.. .... .... 00000090: 6F6F742D 73746172 742D6D61 726B6572 ??.. ../. .._/ .,.. omitted output
By default, the more command shows the content of a file in its original format. Basically, native/original file formats can be classified into three categories: ASCII, binary, and EBCDIC.
The native format for a text file is either ASCII or EBCDIC, while the native format of image files is binary.
Finally, this example shows how to display the content of a file stored on an FTP server.
R1# more ftp://cisco:cisco@10.0.0.100/R1-config.cfg
version 15.0
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
!
!
ip source-route
no ip icmp rate-limit unreachable
ip cef
!
!
!
!
no ipv6 cef
omitted output
Related Lessons to Cisco IOS More Command
- How To Backup Cisco Switch/Router Images Using TFTP Server
- How To Backup/Restore Cisco Switch/Router Configuration Files Using SCP Server
- How To Backup Cisco Switch/Router Images Using FTP Server
- Memory Types Used in a Cisco Router
- How To Reset a Cisco Switch to Factory Defaults
- How to Reset a Cisco Router to Factory Defaults
- How To Backup and Restore Cisco Switch/Router IOS Images Using SCP Server
- How To Backup and Restore Cisco Switch/Router Configuration Files Using FTP
- How To Backup and Restore Cisco Switch/Router Configuration Files Using TFTP Server
- How To Erase Configuration Files on a Cisco Router or Switch
- Cisco IOS More Command
- How To Upgrade Cisco IOS via FTP/TFTP/USB Drive or Console Cable
Conclusion
I hope this blog post helps you learn something.
Now I’d like to turn it over to you:
What did you like about this tutorial?
Or maybe you have an excellent idea that you think I need to add.
Either way, let me know by leaving a comment below right now.