cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1070
Views
5
Helpful
6
Replies

Removing directories

srego4
Level 2
Level 2

Is there any easy way to remove a directory to create space in the flash, without having to delete everysingle file in it first?

rmdir does not work if there are files in the directory.

thks

1 Accepted Solution

Accepted Solutions

Doing this will break your HTML management interface. But the command would be:

delete /recursive /force flash:/c2940-i6q4l2-mz.121-22.EA6/html/images

View solution in original post

6 Replies 6

Joe Clarke
Cisco Employee
Cisco Employee

You can use the /recursive option to delete:

delete /recursive flash:dir

You can also pass /force if you do not want to confirm each file:

delete /recursive /force flash:dir

HI,

I must be doing something wrong. Tried what you said but it does not seem to be doing any deleting.

I am attaching a file showing my directory structure.

What I am trying to do is to delete the directory "images" under flash:/c2940-i6q4l2-mz.121-22.EA6.bin/html/images

Doing this will break your HTML management interface. But the command would be:

delete /recursive /force flash:/c2940-i6q4l2-mz.121-22.EA6/html/images

Thats great. I do not use the html interface.

So in theory I could delete the html directory directly and that would delete the images directory underneath it.

Thanks again.

That is correct.

In the future, if you don't want the HTML interface, just download the .bin images from Cisco.com.

The problem is Cisco ships all the switches with these html images as default. I have tried to get them to not do it, but it would be too expensive and I guess a nightmare for them too.... (even tho, I am ordering abt 500 switches from them a year!)

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: