cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Bookmark
|
Subscribe
|
22244
Views
15
Helpful
3
Replies

Deleteing files and directorys

manuel.dennis
Level 1
Level 1

I have loaded an IOS update to a Cisco 3560 switch.  After loading and cleanup I have a directory left over from the old IOS that causes me problems, but I can't delete it or the sub directory or file in it.   Any suggestions would be appreciated.  Shown below is from the CLI.  c3560-ipservicesk9-mz.122-58.SE2.bin is the current IOS.  Ignore the file dates.  I had to do a password restore and load system defaults because the previous SA left a mess behind when he left.

Manny

Switch#dir flash:
Directory of flash:/

    2  -rwx         616   Mar 1 1993 00:31:12 +00:00  vlan.dat
    3  -rwx    15965969   Mar 1 1993 00:50:21 +00:00  c3560-ipservicesk9-mz.122-58.SE2.bin
    4  -rwx        3096   Mar 1 1993 00:03:01 +00:00  multiple-fs
    5  -rwx        1919   Mar 1 1993 00:03:06 +00:00  private-config.text
    6  drwx         128   Mar 1 1993 00:21:40 +00:00  c3560-ipservices-mz.122-35.SE5
  464  -rwx        2573   Mar 1 1993 00:03:06 +00:00  config.text

32514048 bytes total (14361600 bytes free)

Switch#dir flash:/c3560-ipservices-mz.122-35.SE5
Directory of flash:/c3560-ipservices-mz.122-35.SE5/

    8  drwx        4160   Mar 1 1993 00:09:15 +00:00  html
  463  -rwx         440   Mar 1 1993 00:09:52 +00:00  info

32514048 bytes total (14361600 bytes free)

Switch#del /force flash:/c3560-ipservices-mz.122-35.SE5:info
%Error deleting flash:/c3560-ipservices-mz.122-35.SE5:info (No such file or directory)

Switch#delete /force flash:c3560-ipservices-mz.122-35.SE5
%Error deleting flash:c3560-ipservices-mz.122-35.SE5 (Is a directory)

1 Accepted Solution

Accepted Solutions

Somasundaram Jayaraman
Cisco Employee
Cisco Employee

Hi,

Can you try the below command

delete /force/recursive flash:/c3560-ipservices-mz.122-35.SE5/c3560-ipservices-mz.122-35.SE5.bin

Hope this helps

Cheers

Somu

Rate helpful posts

View solution in original post

3 Replies 3

Somasundaram Jayaraman
Cisco Employee
Cisco Employee

Hi,

Can you try the below command

delete /force/recursive flash:/c3560-ipservices-mz.122-35.SE5/c3560-ipservices-mz.122-35.SE5.bin

Hope this helps

Cheers

Somu

Rate helpful posts

BINGO!!!!!!

delete /force/recursive flash:/c3560-ipservices-mz.122-35.SE5/c3560-ipservices-mz.122-35.SE5.bin

worked like a champ!

Saw it first , so I didn't get a chance to try del /force flash:/ c3560-ipservices-mz.122-35.SE5/info.  It may have worked too, but no way I'm going backwards to find out.

Thanks for the help.

Manny

cadet alain
VIP Alumni
VIP Alumni

Hi,

del /force flash:/c3560-ipservices-mz.122-35.SE5:info

%Error deleting flash:/c3560-ipservices-mz.122-35.SE5:info (No such file or directory)

it should be  

del /force flash:/ c3560-ipservices-mz.122-35.SE5/info

If somu command doesn't work then delete both files in the directory this way then delete the empty directory and it should work.

Regards.

Alain.

Don't forget to rate helpful posts.