2-213
Catalyst 6500 Series Switch Command Reference—Release8.4
OL-6244-01
Chapter2 Catalyst 6500 Series Switch and ROM Monitor Commands fsck
fsck
To check a Flash file system for damage and to repair any problems, use the fsck command.
fsck [m/]device: [automatic]
Syntax Description
Defaults This command has no default settings.
Command Types Switch command.
Command Modes Privileged.
Usage Guidelines In automatic mode, problems are fixed automatically and you are not prompted to confirm any changes
that will be made to the file system.
Examples This example shows how to check a file system for damage and to make repairs. First, enter the dir
command to list files on a device and to display the file that is corrupted:
Console> (enable) dir disk0:
3 -rw- 556 Mar 06 2049 16:26:16 t1
4 -rw- 556 Mar 06 2049 16:26:16 t2
5 -rw- 556 Mar 06 2049 16:26:16 t3
6 -rw- 258048 Mar 06 2049 16:26:16 t4
CORRUPTED
Console> (enable)
128090112 bytes available (16384 bytes used)
Then, enter the fsck command to repair the corrupted file:
Console> (enable) fsck disk0:
Checking the partition table and boot sector...
Checking FAT, Files and Directories...
File size of disk0:/t4 is not correct, correcting it
Reclaiming unused space...
Updating FAT...
Console> (enable)
m/(Optional) Number of the module that contains the Fl ash device.
device:Name of the Flash device; valid device names are disk0: and disk1:.
automatic (Optional) Specifies automatic mode. See the “Usage Guidelines” section for more
information.