电脑的文件系统遇到不正常关机或硬件错误容易遭到破坏。Linux下可以使用fsck命令检查、修复文件系统。 注:由于fsck对磁盘的文件系统进行修复,直接在系统下运行容易把硬盘搞挂,最好用超级用户开机时在修复模式下使用
执行命令: fsck 1.39 (29-May-2006) e2fsck 1.39 (29-May-2006) /dev/sda1 is mounted. WARNING!!! Running e2fsck on a mounted filesystem may cause SEVERE filesystem damage. Do you really want to continue (y/n)? yes /dev/sda1: recovering journal Clearing orphaned inode 1230664 (uid=0, gid=0, mode=0100755, size=1296064) Clearing orphaned inode 1230632 (uid=0, gid=0, mode=0100755, size=6364) Clearing orphaned inode 349170 (uid=0, gid=0, mode=0100755, size=119460) Clearing orphaned inode 349168 (uid=0, gid=0, mode=0100755, size=1203060) Clearing orphaned inode 349166 (uid=0, gid=0, mode=0100755, size=9944) /dev/sda1: clean, 24365/1310720 files, 229945/2621440 blocks
执行: |