cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
141585
Views
36
Helpful
10
Replies

read text file in Flash

How to read text file flash memory

10 Replies 10

pcameron
Cisco Employee
Cisco Employee

Use the 'more' command. Here is a console log showing it in use -

VG202#dir flash:

Directory of flash:/

1 -rw- 18955952 Mar 1 2002 00:19:50 +00:00 vg20x-ipvoice-mz.124-22.T.

bin

128843776 bytes total (109887488 bytes free)

VG202#copy run flash:Myconfig.txt

Destination filename [Myconfig.txt]?

1593 bytes copied in 0.392 secs (4064 bytes/sec)

VG202#dir flash:

Directory of flash:/

2 -rw- 1593 Mar 6 2002 19:28:26 +00:00 Myconfig.txt

1 -rw- 18955952 Mar 1 2002 00:19:50 +00:00 vg20x-ipvoice-mz.124-22.T.

bin

128843776 bytes total (109883392 bytes free)

VG202#

VG202#more flash:Myconfig.txt

!

version 12.4

no service pad

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname VG202

!

boot-start-marker

boot-end-marker

!

logging message-counter syslog

enable password cisco

!

no aaa new-model

ip source-route

!

!

!

!

ip cef

no ipv6 cef

!

stcapp ccm-group 1

stcapp

!

stcapp feature access-code

!

stcapp feature speed-dial

!

!

!

stcapp call-control mode feature

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

voice-card 0

!

archive

log config

hidekeys

!

!

!

!

!

interface FastEthernet0/0

ip address 10.66.75.41 255.255.255.0

duplex auto

speed auto

!

interface FastEthernet0/1

no ip address

shutdown

duplex auto

speed auto

!

ip forward-protocol nd

ip route 0.0.0.0 0.0.0.0 10.66.75.1

!

no ip http server

!

!

!

control-plane

!

!

!

voice-port 0/0

timeouts initial 60

timeouts interdigit 60

timeouts ringing infinity

!

voice-port 0/1

!

ccm-manager fax protocol cisco

ccm-manager config server 10.66.90.130

ccm-manager config

ccm-manager sccp local FastEthernet0/0

ccm-manager sccp

!

mgcp fax t38 ecm

!

sccp local FastEthernet0/0

sccp ccm 10.66.75.212 identifier 2 version 6.0

sccp ccm 10.66.75.211 identifier 1 version 6.0

sccp

!

sccp ccm group 1

associate ccm 1 priority 1

associate ccm 2 priority 2

!

!

dial-peer voice 1 pots

service stcapp

port 0/0

!

dial-peer voice 10 pots

shutdown

destination-pattern 10

port 0/1

!

dial-peer voice 11 pots

shutdown

destination-pattern 11

port 0/0

!

!

!

line con 0

no modem enable

line aux 0

line vty 0 4

password cisco

login

!

exception data-corruption buffer truncate

end

VG202#

Thanks, if we need to read text file from Falsh, for example I have readme.txt in flash, how to read that text file from flash, please light me on this.

use the more command -

router#more readme.txt

Thanks a lot this i need..

Hi Expert,

I am being trying to run some show commands in my production environment for taking all the show command output periodically. But i am unable to get the command syntax along with the output. For a long list of show commands it is difficult to identify the output. 

I am using show version | append ftp://location

also, show version | redirect ftp:location

but the above command only copies the content as i also want the syntax to be included. can you please help me on this.

For example:- Below is the output from output file.

Actual Output:-

---------------------------------------------------------------------------------------

09:04:05.788 CST Fri Mar 11 2016

 

JKN12x01 uptime is 6 years, 39 weeks, 22 hours, 18 minutes

---------------------------------------------------------------------------------------

Expected Output:-

---------------------------------------------------------------------------------------

JKN12x01#sho clock

09:04:05.788 CST Fri Mar 11 2016

 

JKN12x01#sh version | in uptime

JKN12x01 uptime is 6 years, 39 weeks, 22 hours, 18 minutes

---------------------------------------------------------------------------------------

Please assist me in the above query.

 

Thanks in Advance :)

 

Regards,

Jenish Nagoria

Dear all,

Anyone know that how to copy to the current show command into a text file?

Example, copy running-config tftp://192.168.0.1/config.cfg
or
copy flash:xxxx tftp://192.168.0.1/

I have no problem on copy configuration, IOS, etc.

But how to copy the current show run, show inventory, show proc cpu, show tech, into a text file?

Is it we need to create a directory, then issue all this show command, show xxx, show xxx, then capture all this result and save it into text file.

I understand that teraterm or hyper terminal can capture, but i want do it in some script or batch file.

help.

you could use pipe redirect. for example, to save the show vlans output to a file on a tftp server:

 

show vlans | redirect tftp:192.168.1.1/myvlanoutput.txt

 

this will work for any standard destination

This is a really old post, but thank you very much for the response, i was searching for this type of command for a Scheduler implementation in Nexus and works perfectly.

Only one little detail in the command, In the case of nexus it uses the ">" for redirect the output.

Pd: i vote this like a helpful comment.

Best regards!

Teoh Chee Hin
Level 1
Level 1

may i know that how to copy the current show command result to text file?

example, "show interface status" or "show environment", "show tech", i want the show result to be save into a text file with windows based workstation

is it just copy "something" to tftp://192.168.1.1/result.txt" something like tht?

may i know that how to copy the current show command result to text file?

I've already answered to your post/thread.