Check ext2/3/4 filesystems
high risk
e2fsck -n <device>Read-only check firstddrescue <device> image.img mapImage a failing disk firstChecks and repairs ext filesystems. Always run on unmounted devices.
| Flag | Meaning |
|---|---|
-n | Read-only check |
-p | Automatic safe repairs |
-f | Force check |
-y | Answer yes to all repairs⚠ May delete or truncate damaged files. |
e2fsck -n /dev/sdb1Read-only check · explain & risk-check →e2fsck -f /dev/sdb1Force a check · explain & risk-check →Reference text is hand-written and may be incomplete — check man e2fsck for your version. Test destructive commands on a non-production system first.