Some of you may also be asking, how to I delete folders or directories in Cisco IOS? How can I remove folders, go into folders, or manage files in the Cisco IOS or Cisco File System? This especially comes up when one is trying to free up space in the flash.
One thing you might also run into is working with directories. Out of the box, some switches come with their IOS in a folder instead of just sitting bare naked in the flash.
Let’s do a #dir and checkout what we go in our flash.
I’m seeing the startup config file (config.text), the VLAN databse (vlan.dat) and the private-config.text file (used in stackwise switches). At the bottom we can see our IOS image file right?
Nooo!! Don’t hit that boot system cmd just yet – checkout the file attributes on the left.
drwx — People who know Linux will feel at home here. If anyone’s played with Linux you’ll know that these are ways to know if a file is an actual file, a folder, and what permissions you have for this particular file/folder.
Dash means this is not a folder/directory but a regular file.
D means this is a folder/directory.
R means this file is Read permission
W means you have Write permission
X means you have Execute permission
So let’s go ahead and browse the contents of that folder/directory.
Ok here we go, we see some files and what we’re looking for – the .bin file. So when you actually go to specify this bin file, you’ll need to include the FULL filename
Another handy cmd to know is pwd – another Linux cmd, this will tell you what level or directory your sitting in right now.