Link to home
Create AccountLog in
Avatar of eggster34
eggster34

asked on

CHKDSK /R Equivalent for Linux

Hi,
I need to run a disk utility on RHEL 4 to scan for and automatically fix disk problems, like the CHKDSK /r command would do in Windows. What should I do?
Avatar of wilhelm_voigt
wilhelm_voigt
Flag of Austria image

What file system? There "e2fsck" for ext2/ext3, "reiserfsck" for reiserfs, "xfsck" for xfs, etc...
Avatar of omarfarid
use the command fsck

please see man fsck

you can fsck directly. If  will run in teractive mode ask you for input in case of corrections needded. if you want to repair all then run fsck -y

ASKER CERTIFIED SOLUTION
Avatar of http:// thevpn.guru
http:// thevpn.guru
Flag of Denmark image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
As root, you can force a file system into read-only mode. Then it is OK to fsck it. The procedure is documented in "man mount". E.g.:

mount -oro,remount /

do fsck (with ext3, you usually need to do fsck -f)

mount -orw,remount /