Check filesystem integrity
Dry-run fsck check (no changes); unmount first for a live fix
fsck -n /dev/sdb1
- tool
- linux133 commands
- tags
- linuxfilesystemdebug
More linux commands
-
mkfs.ext4 -L datalabel /dev/sdb1Format partition as ext4 with a label
-
resize2fs /dev/sdb1Grow ext4 to fill the partition (after partition resize)
-
tune2fs -l /dev/sda1 | grep -E 'Block (count|size)|Mount count|Last mount'Show ext2/3/4 metadata: block size, mount count, last mount time
-
du -h --max-depth=2 /var | sort -rh | head -20Disk usage of /var up to 2 directory levels deep
-
df -hT --type=ext4 --type=xfs --type=btrfsShow free space only for real filesystems (skip tmpfs/overlay)